Users

Create, edit, and disable users.

POST https://api.ap1.datadoghq.com/api/v1/userhttps://api.datadoghq.eu/api/v1/userhttps://api.ddog-gov.com/api/v1/userhttps://api.datadoghq.com/api/v1/userhttps://api.us3.datadoghq.com/api/v1/userhttps://api.us5.datadoghq.com/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.

This endpoint requires the user_access_invite permission.

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

string

The new email of the user.

handle

string

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": null,
  "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

string

The new email of the user.

handle

string

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": "ro",
    "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"
  ]
}

Too many requests

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.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/user" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "access_role": null, "disabled": false, "email": "test@datadoghq.com", "handle": "test@datadoghq.com", "name": "test user" } EOF

POST https://api.ap1.datadoghq.com/api/v2/usershttps://api.datadoghq.eu/api/v2/usershttps://api.ddog-gov.com/api/v2/usershttps://api.datadoghq.com/api/v2/usershttps://api.us3.datadoghq.com/api/v2/usershttps://api.us5.datadoghq.com/api/v2/users

Overview

Create a user for your organization. This endpoint requires the user_access_invite permission.

OAuth apps require the user_access_invite authorization scope to access this endpoint.

Request

Body Data (required)

Expand All

Field

Type

Description

data [required]

object

Object to create a user.

attributes [required]

object

Attributes of the created user.

email [required]

string

The email of the user.

name

string

The name of the user.

title

string

The title of the user.

relationships

object

Relationships of the user object.

roles

object

Relationship to roles.

data

[object]

An array containing type and the unique identifier of a role.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

type [required]

enum

Users resource type. Allowed enum values: users

default: users

{
  "data": {
    "type": "users",
    "attributes": {
      "name": "Datadog API Client Python",
      "email": "Example-User@datadoghq.com"
    }
  }
}

Response

OK

Response containing information about a single user.

Expand All

Field

Type

Description

data

object

User object returned by the API.

attributes

object

Attributes of user object returned by the API.

created_at

date-time

Creation time of the user.

disabled

boolean

Whether the user is disabled.

email

string

Email of the user.

handle

string

Handle of the user.

icon

string

URL of the user's icon.

mfa_enabled

boolean

If user has MFA enabled.

modified_at

date-time

Time that the user was last modified.

name

string

Name of the user.

service_account

boolean

Whether the user is a service account.

status

string

Status of the user.

title

string

Title of the user.

verified

boolean

Whether the user is verified.

id

string

ID of the user.

relationships

object

Relationships of the user object returned by the API.

org

object

Relationship to an organization.

data [required]

object

Relationship to organization object.

id [required]

string

ID of the organization.

type [required]

enum

Organizations resource type. Allowed enum values: orgs

default: orgs

other_orgs

object

Relationship to organizations.

data [required]

[object]

Relationships to organization objects.

id [required]

string

ID of the organization.

type [required]

enum

Organizations resource type. Allowed enum values: orgs

default: orgs

other_users

object

Relationship to users.

data [required]

[object]

Relationships to user objects.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

roles

object

Relationship to roles.

data

[object]

An array containing type and the unique identifier of a role.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

type

enum

Users resource type. Allowed enum values: users

default: users

included

[ <oneOf>]

Array of objects related to the user.

Option 1

object

Organization object.

attributes

object

Attributes of the organization.

created_at

date-time

Creation time of the organization.

description

string

Description of the organization.

disabled

boolean

Whether or not the organization is disabled.

modified_at

date-time

Time of last organization modification.

name

string

Name of the organization.

public_id

string

Public ID of the organization.

sharing

string

Sharing type of the organization.

url

string

URL of the site that this organization exists at.

id

string

ID of the organization.

type [required]

enum

Organizations resource type. Allowed enum values: orgs

default: orgs

Option 2

object

Permission object.

attributes

object

Attributes of a permission.

created

date-time

Creation time of the permission.

description

string

Description of the permission.

display_name

string

Displayed name for the permission.

display_type

string

Display type.

group_name

string

Name of the permission group.

name

string

Name of the permission.

restricted

boolean

Whether or not the permission is restricted.

id

string

ID of the permission.

type [required]

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

Option 3

object

Role object returned by the API.

attributes

object

Attributes of the role.

created_at

date-time

Creation time of the role.

modified_at

date-time

Time of last role modification.

name

string

The name of the role. The name is neither unique nor a stable identifier of the role.

user_count

int64

Number of users with that role.

id

string

The unique identifier of the role.

relationships

object

Relationships of the role object returned by the API.

permissions

object

Relationship to multiple permissions objects.

data

[object]

Relationships to permission objects.

id

string

ID of the permission.

type

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

type [required]

enum

Roles type. Allowed enum values: roles

default: roles

{
  "data": {
    "attributes": {
      "created_at": "2019-09-19T10:00:00.000Z",
      "disabled": false,
      "email": "string",
      "handle": "string",
      "icon": "string",
      "mfa_enabled": false,
      "modified_at": "2019-09-19T10:00:00.000Z",
      "name": "string",
      "service_account": false,
      "status": "string",
      "title": "string",
      "verified": false
    },
    "id": "string",
    "relationships": {
      "org": {
        "data": {
          "id": "00000000-0000-beef-0000-000000000000",
          "type": "orgs"
        }
      },
      "other_orgs": {
        "data": [
          {
            "id": "00000000-0000-beef-0000-000000000000",
            "type": "orgs"
          }
        ]
      },
      "other_users": {
        "data": [
          {
            "id": "00000000-0000-0000-2345-000000000000",
            "type": "users"
          }
        ]
      },
      "roles": {
        "data": [
          {
            "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
            "type": "roles"
          }
        ]
      }
    },
    "type": "users"
  },
  "included": [
    {
      "attributes": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "description": "string",
        "disabled": false,
        "modified_at": "2019-09-19T10:00:00.000Z",
        "name": "string",
        "public_id": "string",
        "sharing": "string",
        "url": "string"
      },
      "id": "string",
      "type": "orgs"
    }
  ]
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Authentication error

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

                          # Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/users" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "type": "users", "attributes": { "name": "Datadog API Client Python", "email": "Example-User@datadoghq.com" } } } EOF

GET https://api.ap1.datadoghq.com/api/v1/userhttps://api.datadoghq.eu/api/v1/userhttps://api.ddog-gov.com/api/v1/userhttps://api.datadoghq.com/api/v1/userhttps://api.us3.datadoghq.com/api/v1/userhttps://api.us5.datadoghq.com/api/v1/user

Overview

List all users for your organization. This endpoint requires the user_access_read permission.

OAuth apps require the user_access_read authorization scope to access this endpoint.

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

string

The new email of the user.

handle

string

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": "ro",
      "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"
  ]
}

Too many requests

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.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/user" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

GET https://api.ap1.datadoghq.com/api/v2/usershttps://api.datadoghq.eu/api/v2/usershttps://api.ddog-gov.com/api/v2/usershttps://api.datadoghq.com/api/v2/usershttps://api.us3.datadoghq.com/api/v2/usershttps://api.us5.datadoghq.com/api/v2/users

Overview

Get the list of all users in the organization. This list includes all users even if they are deactivated or unverified. This endpoint requires the user_access_read permission.

OAuth apps require the user_access_read authorization scope to access this endpoint.

Arguments

Query Strings

Name

Type

Description

page[size]

integer

Size for a given page. The maximum allowed value is 100.

page[number]

integer

Specific page number to return.

sort

string

User attribute to order results by. Sort order is ascending by default. Sort order is descending if the field is prefixed by a negative sign, for example sort=-name. Options: name, modified_at, user_count.

sort_dir

enum

Direction of sort. Options: asc, desc.
Allowed enum values: asc, desc

filter

string

Filter all users by the given string. Defaults to no filtering.

filter[status]

string

Filter on status attribute. Comma separated list, with possible values Active, Pending, and Disabled. Defaults to no filtering.

Response

OK

Response containing information about multiple users.

Expand All

Field

Type

Description

data

[object]

Array of returned users.

attributes

object

Attributes of user object returned by the API.

created_at

date-time

Creation time of the user.

disabled

boolean

Whether the user is disabled.

email

string

Email of the user.

handle

string

Handle of the user.

icon

string

URL of the user's icon.

mfa_enabled

boolean

If user has MFA enabled.

modified_at

date-time

Time that the user was last modified.

name

string

Name of the user.

service_account

boolean

Whether the user is a service account.

status

string

Status of the user.

title

string

Title of the user.

verified

boolean

Whether the user is verified.

id

string

ID of the user.

relationships

object

Relationships of the user object returned by the API.

org

object

Relationship to an organization.

data [required]

object

Relationship to organization object.

id [required]

string

ID of the organization.

type [required]

enum

Organizations resource type. Allowed enum values: orgs

default: orgs

other_orgs

object

Relationship to organizations.

data [required]

[object]

Relationships to organization objects.

id [required]

string

ID of the organization.

type [required]

enum

Organizations resource type. Allowed enum values: orgs

default: orgs

other_users

object

Relationship to users.

data [required]

[object]

Relationships to user objects.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

roles

object

Relationship to roles.

data

[object]

An array containing type and the unique identifier of a role.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

type

enum

Users resource type. Allowed enum values: users

default: users

included

[ <oneOf>]

Array of objects related to the users.

Option 1

object

Organization object.

attributes

object

Attributes of the organization.

created_at

date-time

Creation time of the organization.

description

string

Description of the organization.

disabled

boolean

Whether or not the organization is disabled.

modified_at

date-time

Time of last organization modification.

name

string

Name of the organization.

public_id

string

Public ID of the organization.

sharing

string

Sharing type of the organization.

url

string

URL of the site that this organization exists at.

id

string

ID of the organization.

type [required]

enum

Organizations resource type. Allowed enum values: orgs

default: orgs

Option 2

object

Permission object.

attributes

object

Attributes of a permission.

created

date-time

Creation time of the permission.

description

string

Description of the permission.

display_name

string

Displayed name for the permission.

display_type

string

Display type.

group_name

string

Name of the permission group.

name

string

Name of the permission.

restricted

boolean

Whether or not the permission is restricted.

id

string

ID of the permission.

type [required]

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

Option 3

object

Role object returned by the API.

attributes

object

Attributes of the role.

created_at

date-time

Creation time of the role.

modified_at

date-time

Time of last role modification.

name

string

The name of the role. The name is neither unique nor a stable identifier of the role.

user_count

int64

Number of users with that role.

id

string

The unique identifier of the role.

relationships

object

Relationships of the role object returned by the API.

permissions

object

Relationship to multiple permissions objects.

data

[object]

Relationships to permission objects.

id

string

ID of the permission.

type

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

type [required]

enum

Roles type. Allowed enum values: roles

default: roles

meta

object

Object describing meta attributes of response.

page

object

Pagination object.

total_count

int64

Total count.

total_filtered_count

int64

Total count of elements matched by the filter.

{
  "data": [
    {
      "attributes": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "disabled": false,
        "email": "string",
        "handle": "string",
        "icon": "string",
        "mfa_enabled": false,
        "modified_at": "2019-09-19T10:00:00.000Z",
        "name": "string",
        "service_account": false,
        "status": "string",
        "title": "string",
        "verified": false
      },
      "id": "string",
      "relationships": {
        "org": {
          "data": {
            "id": "00000000-0000-beef-0000-000000000000",
            "type": "orgs"
          }
        },
        "other_orgs": {
          "data": [
            {
              "id": "00000000-0000-beef-0000-000000000000",
              "type": "orgs"
            }
          ]
        },
        "other_users": {
          "data": [
            {
              "id": "00000000-0000-0000-2345-000000000000",
              "type": "users"
            }
          ]
        },
        "roles": {
          "data": [
            {
              "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
              "type": "roles"
            }
          ]
        }
      },
      "type": "users"
    }
  ],
  "included": [
    {
      "attributes": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "description": "string",
        "disabled": false,
        "modified_at": "2019-09-19T10:00:00.000Z",
        "name": "string",
        "public_id": "string",
        "sharing": "string",
        "url": "string"
      },
      "id": "string",
      "type": "orgs"
    }
  ],
  "meta": {
    "page": {
      "total_count": "integer",
      "total_filtered_count": "integer"
    }
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Authentication error

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/users" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

GET https://api.ap1.datadoghq.com/api/v1/user/{user_handle}https://api.datadoghq.eu/api/v1/user/{user_handle}https://api.ddog-gov.com/api/v1/user/{user_handle}https://api.datadoghq.com/api/v1/user/{user_handle}https://api.us3.datadoghq.com/api/v1/user/{user_handle}https://api.us5.datadoghq.com/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

string

The new email of the user.

handle

string

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": "ro",
    "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"
  ]
}

Too many requests

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.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/user/${user_handle}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

GET https://api.ap1.datadoghq.com/api/v2/users/{user_id}https://api.datadoghq.eu/api/v2/users/{user_id}https://api.ddog-gov.com/api/v2/users/{user_id}https://api.datadoghq.com/api/v2/users/{user_id}https://api.us3.datadoghq.com/api/v2/users/{user_id}https://api.us5.datadoghq.com/api/v2/users/{user_id}

Overview

Get a user in the organization specified by the user’s user_id. This endpoint requires the user_access_read permission.

OAuth apps require the user_access_read authorization scope to access this endpoint.

Arguments

Path Parameters

Name

Type

Description

user_id [required]

string

The ID of the user.

Response

OK

Response containing information about a single user.

Expand All

Field

Type

Description

data

object

User object returned by the API.

attributes

object

Attributes of user object returned by the API.

created_at

date-time

Creation time of the user.

disabled

boolean

Whether the user is disabled.

email

string

Email of the user.

handle

string

Handle of the user.

icon

string

URL of the user's icon.

mfa_enabled

boolean

If user has MFA enabled.

modified_at

date-time

Time that the user was last modified.

name

string

Name of the user.

service_account

boolean

Whether the user is a service account.

status

string

Status of the user.

title

string

Title of the user.

verified

boolean

Whether the user is verified.

id

string

ID of the user.

relationships

object

Relationships of the user object returned by the API.

org

object

Relationship to an organization.

data [required]

object

Relationship to organization object.

id [required]

string

ID of the organization.

type [required]

enum

Organizations resource type. Allowed enum values: orgs

default: orgs

other_orgs

object

Relationship to organizations.

data [required]

[object]

Relationships to organization objects.

id [required]

string

ID of the organization.

type [required]

enum

Organizations resource type. Allowed enum values: orgs

default: orgs

other_users

object

Relationship to users.

data [required]

[object]

Relationships to user objects.

id [required]

string

A unique identifier that represents the user.

type [required]

enum

Users resource type. Allowed enum values: users

default: users

roles

object

Relationship to roles.

data

[object]

An array containing type and the unique identifier of a role.

id

string

The unique identifier of the role.

type

enum

Roles type. Allowed enum values: roles

default: roles

type

enum

Users resource type. Allowed enum values: users

default: users

included

[ <oneOf>]

Array of objects related to the user.

Option 1

object

Organization object.

attributes

object

Attributes of the organization.

created_at

date-time

Creation time of the organization.

description

string

Description of the organization.

disabled

boolean

Whether or not the organization is disabled.

modified_at

date-time

Time of last organization modification.

name

string

Name of the organization.

public_id

string

Public ID of the organization.

sharing

string

Sharing type of the organization.

url

string

URL of the site that this organization exists at.

id

string

ID of the organization.

type [required]

enum

Organizations resource type. Allowed enum values: orgs

default: orgs

Option 2

object

Permission object.

attributes

object

Attributes of a permission.

created

date-time

Creation time of the permission.

description

string

Description of the permission.

display_name

string

Displayed name for the permission.

display_type

string

Display type.

group_name

string

Name of the permission group.

name

string

Name of the permission.

restricted

boolean

Whether or not the permission is restricted.

id

string

ID of the permission.

type [required]

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

Option 3

object

Role object returned by the API.

attributes

object

Attributes of the role.

created_at

date-time

Creation time of the role.

modified_at

date-time

Time of last role modification.

name

string

The name of the role. The name is neither unique nor a stable identifier of the role.

user_count

int64

Number of users with that role.

id

string

The unique identifier of the role.

relationships

object

Relationships of the role object returned by the API.

permissions

object

Relationship to multiple permissions objects.

data

[object]

Relationships to permission objects.

id

string

ID of the permission.

type

enum

Permissions resource type. Allowed enum values: permissions

default: permissions

type [required]

enum

Roles type. Allowed enum values: roles

default: roles

{
  "data": {
    "attributes": {
      "created_at": "2019-09-19T10:00:00.000Z",
      "disabled": false,
      "email": "string",
      "handle": "string",
      "icon": "string",
      "mfa_enabled": false,
      "modified_at": "2019-09-19T10:00:00.000Z",
      "name": "string",
      "service_account": false,
      "status": "string",
      "title": "string",
      "verified": false
    },
    "id": "string",
    "relationships": {
      "org": {
        "data": {
          "id": "00000000-0000-beef-0000-000000000000",
          "type": "orgs"
        }
      },
      "other_orgs": {
        "data": [
          {
            "id": "00000000-0000-beef-0000-000000000000",
            "type": "orgs"
          }
        ]
      },
      "other_users": {
        "data": [
          {
            "id": "00000000-0000-0000-2345-000000000000",
            "type": "users"
          }
        ]
      },
      "roles": {
        "data": [
          {
            "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
            "type": "roles"
          }
        ]
      }
    },
    "type": "users"
  },
  "included": [
    {
      "attributes": {
        "created_at": "2019-09-19T10:00:00.000Z",
        "description": "string",
        "disabled": false,
        "modified_at": "2019-09-19T10:00:00.000Z",
        "name": "string",
        "public_id": "string",
        "sharing": "string",
        "url": "string"
      },
      "id": "string",
      "type": "orgs"
    }
  ]
}

Authentication error

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Not found

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

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

Code Example

                  # Path parameters
export user_id="00000000-0000-9999-0000-000000000000"
# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/users/${user_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

PUT https://api.ap1.datadoghq.com/api/v1/user/{user_handle}https://api.datadoghq.eu/api/v1/user/{user_handle}https://api.ddog-gov.com/api/v1/user/{user_handle}https://api.datadoghq.com/api/v1/user/{user_handle}https://api.us3.datadoghq.com/api/v1/user/{user_handle}https://api.us5.datadoghq.com/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

string

The new email of the user.

handle

string

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": "ro",
  "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

string

The new email of the user.

handle

string

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": "ro",
    "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"
  ]
}

Too many requests

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.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/user/${user_handle}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF {} EOF

PATCH https://api.ap1.datadoghq.com/api/v2/users/{user_id}https://api.datadoghq.eu/api/v2/users/{user_id}https://api.ddog-gov.com/api/v2/users/{user_id}https://api.datadoghq.com/api/v2/users/{user_id}https://api.us3.datadoghq.com/api/v2/users/{user_id}https://api.us5.datadoghq.com/api/v2/users/{user_id}

Overview

Edit a user. Can only be used with an application key belonging to an administrator user. This endpoint requires any of the following permissions:

  • user_access_manage
  • service_account_write

  • OAuth apps require the user_access_manage authorization scope to access this endpoint.

    Arguments

    Path Parameters

    Name

    Type

    Description

    user_id [required]

    string

    The ID of the user.

    Request

    Body Data (required)

    Expand All

    Field

    Type

    Description

    data [required]

    object

    Object to update a user.

    attributes [required]

    object

    Attributes of the edited user.

    disabled

    boolean

    If the user is enabled or disabled.

    email

    string

    The email of the user.

    name

    string

    The name of the user.

    id [required]

    string

    ID of the user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    {
      "data": {
        "id": "string",
        "type": "users",
        "attributes": {
          "name": "updated",
          "disabled": true
        }
      }
    }

    Response

    OK

    Response containing information about a single user.

    Expand All

    Field

    Type

    Description

    data

    object

    User object returned by the API.

    attributes

    object

    Attributes of user object returned by the API.

    created_at

    date-time

    Creation time of the user.

    disabled

    boolean

    Whether the user is disabled.

    email

    string

    Email of the user.

    handle

    string

    Handle of the user.

    icon

    string

    URL of the user's icon.

    mfa_enabled

    boolean

    If user has MFA enabled.

    modified_at

    date-time

    Time that the user was last modified.

    name

    string

    Name of the user.

    service_account

    boolean

    Whether the user is a service account.

    status

    string

    Status of the user.

    title

    string

    Title of the user.

    verified

    boolean

    Whether the user is verified.

    id

    string

    ID of the user.

    relationships

    object

    Relationships of the user object returned by the API.

    org

    object

    Relationship to an organization.

    data [required]

    object

    Relationship to organization object.

    id [required]

    string

    ID of the organization.

    type [required]

    enum

    Organizations resource type. Allowed enum values: orgs

    default: orgs

    other_orgs

    object

    Relationship to organizations.

    data [required]

    [object]

    Relationships to organization objects.

    id [required]

    string

    ID of the organization.

    type [required]

    enum

    Organizations resource type. Allowed enum values: orgs

    default: orgs

    other_users

    object

    Relationship to users.

    data [required]

    [object]

    Relationships to user objects.

    id [required]

    string

    A unique identifier that represents the user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    roles

    object

    Relationship to roles.

    data

    [object]

    An array containing type and the unique identifier of a role.

    id

    string

    The unique identifier of the role.

    type

    enum

    Roles type. Allowed enum values: roles

    default: roles

    type

    enum

    Users resource type. Allowed enum values: users

    default: users

    included

    [ <oneOf>]

    Array of objects related to the user.

    Option 1

    object

    Organization object.

    attributes

    object

    Attributes of the organization.

    created_at

    date-time

    Creation time of the organization.

    description

    string

    Description of the organization.

    disabled

    boolean

    Whether or not the organization is disabled.

    modified_at

    date-time

    Time of last organization modification.

    name

    string

    Name of the organization.

    public_id

    string

    Public ID of the organization.

    sharing

    string

    Sharing type of the organization.

    url

    string

    URL of the site that this organization exists at.

    id

    string

    ID of the organization.

    type [required]

    enum

    Organizations resource type. Allowed enum values: orgs

    default: orgs

    Option 2

    object

    Permission object.

    attributes

    object

    Attributes of a permission.

    created

    date-time

    Creation time of the permission.

    description

    string

    Description of the permission.

    display_name

    string

    Displayed name for the permission.

    display_type

    string

    Display type.

    group_name

    string

    Name of the permission group.

    name

    string

    Name of the permission.

    restricted

    boolean

    Whether or not the permission is restricted.

    id

    string

    ID of the permission.

    type [required]

    enum

    Permissions resource type. Allowed enum values: permissions

    default: permissions

    Option 3

    object

    Role object returned by the API.

    attributes

    object

    Attributes of the role.

    created_at

    date-time

    Creation time of the role.

    modified_at

    date-time

    Time of last role modification.

    name

    string

    The name of the role. The name is neither unique nor a stable identifier of the role.

    user_count

    int64

    Number of users with that role.

    id

    string

    The unique identifier of the role.

    relationships

    object

    Relationships of the role object returned by the API.

    permissions

    object

    Relationship to multiple permissions objects.

    data

    [object]

    Relationships to permission objects.

    id

    string

    ID of the permission.

    type

    enum

    Permissions resource type. Allowed enum values: permissions

    default: permissions

    type [required]

    enum

    Roles type. Allowed enum values: roles

    default: roles

    {
      "data": {
        "attributes": {
          "created_at": "2019-09-19T10:00:00.000Z",
          "disabled": false,
          "email": "string",
          "handle": "string",
          "icon": "string",
          "mfa_enabled": false,
          "modified_at": "2019-09-19T10:00:00.000Z",
          "name": "string",
          "service_account": false,
          "status": "string",
          "title": "string",
          "verified": false
        },
        "id": "string",
        "relationships": {
          "org": {
            "data": {
              "id": "00000000-0000-beef-0000-000000000000",
              "type": "orgs"
            }
          },
          "other_orgs": {
            "data": [
              {
                "id": "00000000-0000-beef-0000-000000000000",
                "type": "orgs"
              }
            ]
          },
          "other_users": {
            "data": [
              {
                "id": "00000000-0000-0000-2345-000000000000",
                "type": "users"
              }
            ]
          },
          "roles": {
            "data": [
              {
                "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
                "type": "roles"
              }
            ]
          }
        },
        "type": "users"
      },
      "included": [
        {
          "attributes": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "description": "string",
            "disabled": false,
            "modified_at": "2019-09-19T10:00:00.000Z",
            "name": "string",
            "public_id": "string",
            "sharing": "string",
            "url": "string"
          },
          "id": "string",
          "type": "orgs"
        }
      ]
    }

    Bad Request

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Authentication error

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Not found

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Unprocessable Entity

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Too many requests

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Code Example

                              # Path parameters
    export user_id="00000000-0000-9999-0000-000000000000"
    # Curl command
    curl -X PATCH "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/users/${user_id}" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "id": "string", "type": "users", "attributes": { "name": "updated", "disabled": true } } } EOF

    DELETE https://api.ap1.datadoghq.com/api/v1/user/{user_handle}https://api.datadoghq.eu/api/v1/user/{user_handle}https://api.ddog-gov.com/api/v1/user/{user_handle}https://api.datadoghq.com/api/v1/user/{user_handle}https://api.us3.datadoghq.com/api/v1/user/{user_handle}https://api.us5.datadoghq.com/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"
      ]
    }

    Too many requests

    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.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v1/user/${user_handle}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    DELETE https://api.ap1.datadoghq.com/api/v2/users/{user_id}https://api.datadoghq.eu/api/v2/users/{user_id}https://api.ddog-gov.com/api/v2/users/{user_id}https://api.datadoghq.com/api/v2/users/{user_id}https://api.us3.datadoghq.com/api/v2/users/{user_id}https://api.us5.datadoghq.com/api/v2/users/{user_id}

    Overview

    Disable a user. Can only be used with an application key belonging to an administrator user. This endpoint requires any of the following permissions:

  • user_access_manage
  • service_account_write

  • OAuth apps require the user_access_manage authorization scope to access this endpoint.

    Arguments

    Path Parameters

    Name

    Type

    Description

    user_id [required]

    string

    The ID of the user.

    Response

    OK

    Authentication error

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Not found

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Too many requests

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Code Example

                      # Path parameters
    export user_id="00000000-0000-9999-0000-000000000000"
    # Curl command
    curl -X DELETE "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/users/${user_id}" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    GET https://api.ap1.datadoghq.com/api/v2/users/{user_id}/orgshttps://api.datadoghq.eu/api/v2/users/{user_id}/orgshttps://api.ddog-gov.com/api/v2/users/{user_id}/orgshttps://api.datadoghq.com/api/v2/users/{user_id}/orgshttps://api.us3.datadoghq.com/api/v2/users/{user_id}/orgshttps://api.us5.datadoghq.com/api/v2/users/{user_id}/orgs

    Overview

    Get a user organization. Returns the user information and all organizations joined by this user.

    Arguments

    Path Parameters

    Name

    Type

    Description

    user_id [required]

    string

    The ID of the user.

    Response

    OK

    Response containing information about a single user.

    Expand All

    Field

    Type

    Description

    data

    object

    User object returned by the API.

    attributes

    object

    Attributes of user object returned by the API.

    created_at

    date-time

    Creation time of the user.

    disabled

    boolean

    Whether the user is disabled.

    email

    string

    Email of the user.

    handle

    string

    Handle of the user.

    icon

    string

    URL of the user's icon.

    mfa_enabled

    boolean

    If user has MFA enabled.

    modified_at

    date-time

    Time that the user was last modified.

    name

    string

    Name of the user.

    service_account

    boolean

    Whether the user is a service account.

    status

    string

    Status of the user.

    title

    string

    Title of the user.

    verified

    boolean

    Whether the user is verified.

    id

    string

    ID of the user.

    relationships

    object

    Relationships of the user object returned by the API.

    org

    object

    Relationship to an organization.

    data [required]

    object

    Relationship to organization object.

    id [required]

    string

    ID of the organization.

    type [required]

    enum

    Organizations resource type. Allowed enum values: orgs

    default: orgs

    other_orgs

    object

    Relationship to organizations.

    data [required]

    [object]

    Relationships to organization objects.

    id [required]

    string

    ID of the organization.

    type [required]

    enum

    Organizations resource type. Allowed enum values: orgs

    default: orgs

    other_users

    object

    Relationship to users.

    data [required]

    [object]

    Relationships to user objects.

    id [required]

    string

    A unique identifier that represents the user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    roles

    object

    Relationship to roles.

    data

    [object]

    An array containing type and the unique identifier of a role.

    id

    string

    The unique identifier of the role.

    type

    enum

    Roles type. Allowed enum values: roles

    default: roles

    type

    enum

    Users resource type. Allowed enum values: users

    default: users

    included

    [ <oneOf>]

    Array of objects related to the user.

    Option 1

    object

    Organization object.

    attributes

    object

    Attributes of the organization.

    created_at

    date-time

    Creation time of the organization.

    description

    string

    Description of the organization.

    disabled

    boolean

    Whether or not the organization is disabled.

    modified_at

    date-time

    Time of last organization modification.

    name

    string

    Name of the organization.

    public_id

    string

    Public ID of the organization.

    sharing

    string

    Sharing type of the organization.

    url

    string

    URL of the site that this organization exists at.

    id

    string

    ID of the organization.

    type [required]

    enum

    Organizations resource type. Allowed enum values: orgs

    default: orgs

    Option 2

    object

    Permission object.

    attributes

    object

    Attributes of a permission.

    created

    date-time

    Creation time of the permission.

    description

    string

    Description of the permission.

    display_name

    string

    Displayed name for the permission.

    display_type

    string

    Display type.

    group_name

    string

    Name of the permission group.

    name

    string

    Name of the permission.

    restricted

    boolean

    Whether or not the permission is restricted.

    id

    string

    ID of the permission.

    type [required]

    enum

    Permissions resource type. Allowed enum values: permissions

    default: permissions

    Option 3

    object

    Role object returned by the API.

    attributes

    object

    Attributes of the role.

    created_at

    date-time

    Creation time of the role.

    modified_at

    date-time

    Time of last role modification.

    name

    string

    The name of the role. The name is neither unique nor a stable identifier of the role.

    user_count

    int64

    Number of users with that role.

    id

    string

    The unique identifier of the role.

    relationships

    object

    Relationships of the role object returned by the API.

    permissions

    object

    Relationship to multiple permissions objects.

    data

    [object]

    Relationships to permission objects.

    id

    string

    ID of the permission.

    type

    enum

    Permissions resource type. Allowed enum values: permissions

    default: permissions

    type [required]

    enum

    Roles type. Allowed enum values: roles

    default: roles

    {
      "data": {
        "attributes": {
          "created_at": "2019-09-19T10:00:00.000Z",
          "disabled": false,
          "email": "string",
          "handle": "string",
          "icon": "string",
          "mfa_enabled": false,
          "modified_at": "2019-09-19T10:00:00.000Z",
          "name": "string",
          "service_account": false,
          "status": "string",
          "title": "string",
          "verified": false
        },
        "id": "string",
        "relationships": {
          "org": {
            "data": {
              "id": "00000000-0000-beef-0000-000000000000",
              "type": "orgs"
            }
          },
          "other_orgs": {
            "data": [
              {
                "id": "00000000-0000-beef-0000-000000000000",
                "type": "orgs"
              }
            ]
          },
          "other_users": {
            "data": [
              {
                "id": "00000000-0000-0000-2345-000000000000",
                "type": "users"
              }
            ]
          },
          "roles": {
            "data": [
              {
                "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
                "type": "roles"
              }
            ]
          }
        },
        "type": "users"
      },
      "included": [
        {
          "attributes": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "description": "string",
            "disabled": false,
            "modified_at": "2019-09-19T10:00:00.000Z",
            "name": "string",
            "public_id": "string",
            "sharing": "string",
            "url": "string"
          },
          "id": "string",
          "type": "orgs"
        }
      ]
    }

    Authentication error

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Not found

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Too many requests

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Code Example

                      # Path parameters
    export user_id="00000000-0000-9999-0000-000000000000"
    # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/users/${user_id}/orgs" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    GET https://api.ap1.datadoghq.com/api/v2/users/{user_id}/permissionshttps://api.datadoghq.eu/api/v2/users/{user_id}/permissionshttps://api.ddog-gov.com/api/v2/users/{user_id}/permissionshttps://api.datadoghq.com/api/v2/users/{user_id}/permissionshttps://api.us3.datadoghq.com/api/v2/users/{user_id}/permissionshttps://api.us5.datadoghq.com/api/v2/users/{user_id}/permissions

    Overview

    Get a user permission set. Returns a list of the user’s permissions granted by the associated user’s roles. This endpoint requires the user_access_read permission.

    OAuth apps require the user_access_read authorization scope to access this endpoint.

    Arguments

    Path Parameters

    Name

    Type

    Description

    user_id [required]

    string

    The ID of the user.

    Response

    OK

    Payload with API-returned permissions.

    Expand All

    Field

    Type

    Description

    data

    [object]

    Array of permissions.

    attributes

    object

    Attributes of a permission.

    created

    date-time

    Creation time of the permission.

    description

    string

    Description of the permission.

    display_name

    string

    Displayed name for the permission.

    display_type

    string

    Display type.

    group_name

    string

    Name of the permission group.

    name

    string

    Name of the permission.

    restricted

    boolean

    Whether or not the permission is restricted.

    id

    string

    ID of the permission.

    type [required]

    enum

    Permissions resource type. Allowed enum values: permissions

    default: permissions

    {
      "data": [
        {
          "attributes": {
            "created": "2019-09-19T10:00:00.000Z",
            "description": "string",
            "display_name": "string",
            "display_type": "string",
            "group_name": "string",
            "name": "string",
            "restricted": false
          },
          "id": "string",
          "type": "permissions"
        }
      ]
    }

    Authentication error

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Not found

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Too many requests

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Code Example

                      # Path parameters
    export user_id="00000000-0000-9999-0000-000000000000"
    # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/users/${user_id}/permissions" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

    POST https://api.ap1.datadoghq.com/api/v2/user_invitationshttps://api.datadoghq.eu/api/v2/user_invitationshttps://api.ddog-gov.com/api/v2/user_invitationshttps://api.datadoghq.com/api/v2/user_invitationshttps://api.us3.datadoghq.com/api/v2/user_invitationshttps://api.us5.datadoghq.com/api/v2/user_invitations

    Overview

    Sends emails to one or more users inviting them to join the organization. This endpoint requires the user_access_invite permission.

    OAuth apps require the user_access_invite authorization scope to access this endpoint.

    Request

    Body Data (required)

    Expand All

    Field

    Type

    Description

    data [required]

    [object]

    List of user invitations.

    relationships [required]

    object

    Relationships data for user invitation.

    user [required]

    object

    Relationship to user.

    data [required]

    object

    Relationship to user object.

    id [required]

    string

    A unique identifier that represents the user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type [required]

    enum

    User invitations type. Allowed enum values: user_invitations

    default: user_invitations

    {
      "data": [
        {
          "type": "user_invitations",
          "relationships": {
            "user": {
              "data": {
                "type": "users",
                "id": "string"
              }
            }
          }
        }
      ]
    }

    Response

    OK

    User invitations as returned by the API.

    Expand All

    Field

    Type

    Description

    data

    [object]

    Array of user invitations.

    attributes

    object

    Attributes of a user invitation.

    created_at

    date-time

    Creation time of the user invitation.

    expires_at

    date-time

    Time of invitation expiration.

    invite_type

    string

    Type of invitation.

    uuid

    string

    UUID of the user invitation.

    id

    string

    ID of the user invitation.

    relationships

    object

    Relationships data for user invitation.

    user [required]

    object

    Relationship to user.

    data [required]

    object

    Relationship to user object.

    id [required]

    string

    A unique identifier that represents the user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type

    enum

    User invitations type. Allowed enum values: user_invitations

    default: user_invitations

    {
      "data": [
        {
          "attributes": {
            "created_at": "2019-09-19T10:00:00.000Z",
            "expires_at": "2019-09-19T10:00:00.000Z",
            "invite_type": "string",
            "uuid": "string"
          },
          "id": "string",
          "relationships": {
            "user": {
              "data": {
                "id": "00000000-0000-0000-2345-000000000000",
                "type": "users"
              }
            }
          },
          "type": "user_invitations"
        }
      ]
    }

    Bad Request

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Authentication error

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Too many requests

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Code Example

                              # Curl command
    curl -X POST "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/user_invitations" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": [ { "type": "user_invitations", "relationships": { "user": { "data": { "type": "users", "id": "string" } } } } ] } EOF

    GET https://api.ap1.datadoghq.com/api/v2/user_invitations/{user_invitation_uuid}https://api.datadoghq.eu/api/v2/user_invitations/{user_invitation_uuid}https://api.ddog-gov.com/api/v2/user_invitations/{user_invitation_uuid}https://api.datadoghq.com/api/v2/user_invitations/{user_invitation_uuid}https://api.us3.datadoghq.com/api/v2/user_invitations/{user_invitation_uuid}https://api.us5.datadoghq.com/api/v2/user_invitations/{user_invitation_uuid}

    Overview

    Returns a single user invitation by its UUID. This endpoint requires the user_access_invite permission.

    OAuth apps require the user_access_invite authorization scope to access this endpoint.

    Arguments

    Path Parameters

    Name

    Type

    Description

    user_invitation_uuid [required]

    string

    The UUID of the user invitation.

    Response

    OK

    User invitation as returned by the API.

    Expand All

    Field

    Type

    Description

    data

    object

    Object of a user invitation returned by the API.

    attributes

    object

    Attributes of a user invitation.

    created_at

    date-time

    Creation time of the user invitation.

    expires_at

    date-time

    Time of invitation expiration.

    invite_type

    string

    Type of invitation.

    uuid

    string

    UUID of the user invitation.

    id

    string

    ID of the user invitation.

    relationships

    object

    Relationships data for user invitation.

    user [required]

    object

    Relationship to user.

    data [required]

    object

    Relationship to user object.

    id [required]

    string

    A unique identifier that represents the user.

    type [required]

    enum

    Users resource type. Allowed enum values: users

    default: users

    type

    enum

    User invitations type. Allowed enum values: user_invitations

    default: user_invitations

    {
      "data": {
        "attributes": {
          "created_at": "2019-09-19T10:00:00.000Z",
          "expires_at": "2019-09-19T10:00:00.000Z",
          "invite_type": "string",
          "uuid": "string"
        },
        "id": "string",
        "relationships": {
          "user": {
            "data": {
              "id": "00000000-0000-0000-2345-000000000000",
              "type": "users"
            }
          }
        },
        "type": "user_invitations"
      }
    }

    Authentication error

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Not found

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Too many requests

    API error response.

    Expand All

    Field

    Type

    Description

    errors [required]

    [string]

    A list of errors.

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

    Code Example

                      # Path parameters
    export user_invitation_uuid="00000000-0000-0000-3456-000000000000"
    # Curl command
    curl -X GET "https://api.ap1.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/user_invitations/${user_invitation_uuid}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"