For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/api/latest/roles.md. A documentation index is available at /llms.txt.

The Roles API is used to create and manage Datadog roles, what global permissions they grant, and which users belong to them.

Permissions related to specific account assets can be granted to roles in the Datadog application without using this API. For example, granting read access on a specific log index to a role can be done in Datadog from the Pipelines page.

Roles can also be managed in bulk through the Datadog UI, which provides the capability to assign a single permission to multiple roles simultaneously.

List permissions

GET https://api.ap1.datadoghq.com/api/v2/permissionshttps://api.ap2.datadoghq.com/api/v2/permissionshttps://api.datadoghq.eu/api/v2/permissionshttps://api.ddog-gov.com/api/v2/permissionshttps://api.us2.ddog-gov.com/api/v2/permissionshttps://api.uk1.datadoghq.com/api/v2/permissionshttps://api.datadoghq.com/api/v2/permissionshttps://api.us3.datadoghq.com/api/v2/permissionshttps://api.us5.datadoghq.com/api/v2/permissions

List roles

GET https://api.ap1.datadoghq.com/api/v2/roleshttps://api.ap2.datadoghq.com/api/v2/roleshttps://api.datadoghq.eu/api/v2/roleshttps://api.ddog-gov.com/api/v2/roleshttps://api.us2.ddog-gov.com/api/v2/roleshttps://api.uk1.datadoghq.com/api/v2/roleshttps://api.datadoghq.com/api/v2/roleshttps://api.us3.datadoghq.com/api/v2/roleshttps://api.us5.datadoghq.com/api/v2/roles

Create role

POST https://api.ap1.datadoghq.com/api/v2/roleshttps://api.ap2.datadoghq.com/api/v2/roleshttps://api.datadoghq.eu/api/v2/roleshttps://api.ddog-gov.com/api/v2/roleshttps://api.us2.ddog-gov.com/api/v2/roleshttps://api.uk1.datadoghq.com/api/v2/roleshttps://api.datadoghq.com/api/v2/roleshttps://api.us3.datadoghq.com/api/v2/roleshttps://api.us5.datadoghq.com/api/v2/roles

Get a role

GET https://api.ap1.datadoghq.com/api/v2/roles/{role_id}https://api.ap2.datadoghq.com/api/v2/roles/{role_id}https://api.datadoghq.eu/api/v2/roles/{role_id}https://api.ddog-gov.com/api/v2/roles/{role_id}https://api.us2.ddog-gov.com/api/v2/roles/{role_id}https://api.uk1.datadoghq.com/api/v2/roles/{role_id}https://api.datadoghq.com/api/v2/roles/{role_id}https://api.us3.datadoghq.com/api/v2/roles/{role_id}https://api.us5.datadoghq.com/api/v2/roles/{role_id}

Update a role

PATCH https://api.ap1.datadoghq.com/api/v2/roles/{role_id}https://api.ap2.datadoghq.com/api/v2/roles/{role_id}https://api.datadoghq.eu/api/v2/roles/{role_id}https://api.ddog-gov.com/api/v2/roles/{role_id}https://api.us2.ddog-gov.com/api/v2/roles/{role_id}https://api.uk1.datadoghq.com/api/v2/roles/{role_id}https://api.datadoghq.com/api/v2/roles/{role_id}https://api.us3.datadoghq.com/api/v2/roles/{role_id}https://api.us5.datadoghq.com/api/v2/roles/{role_id}

Delete role

DELETE https://api.ap1.datadoghq.com/api/v2/roles/{role_id}https://api.ap2.datadoghq.com/api/v2/roles/{role_id}https://api.datadoghq.eu/api/v2/roles/{role_id}https://api.ddog-gov.com/api/v2/roles/{role_id}https://api.us2.ddog-gov.com/api/v2/roles/{role_id}https://api.uk1.datadoghq.com/api/v2/roles/{role_id}https://api.datadoghq.com/api/v2/roles/{role_id}https://api.us3.datadoghq.com/api/v2/roles/{role_id}https://api.us5.datadoghq.com/api/v2/roles/{role_id}

List permissions for a role

GET https://api.ap1.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.ap2.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.datadoghq.eu/api/v2/roles/{role_id}/permissionshttps://api.ddog-gov.com/api/v2/roles/{role_id}/permissionshttps://api.us2.ddog-gov.com/api/v2/roles/{role_id}/permissionshttps://api.uk1.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.us3.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.us5.datadoghq.com/api/v2/roles/{role_id}/permissions

Grant permission to a role

POST https://api.ap1.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.ap2.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.datadoghq.eu/api/v2/roles/{role_id}/permissionshttps://api.ddog-gov.com/api/v2/roles/{role_id}/permissionshttps://api.us2.ddog-gov.com/api/v2/roles/{role_id}/permissionshttps://api.uk1.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.us3.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.us5.datadoghq.com/api/v2/roles/{role_id}/permissions

Revoke permission

DELETE https://api.ap1.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.ap2.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.datadoghq.eu/api/v2/roles/{role_id}/permissionshttps://api.ddog-gov.com/api/v2/roles/{role_id}/permissionshttps://api.us2.ddog-gov.com/api/v2/roles/{role_id}/permissionshttps://api.uk1.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.us3.datadoghq.com/api/v2/roles/{role_id}/permissionshttps://api.us5.datadoghq.com/api/v2/roles/{role_id}/permissions

Get all users of a role

GET https://api.ap1.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.ap2.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.datadoghq.eu/api/v2/roles/{role_id}/usershttps://api.ddog-gov.com/api/v2/roles/{role_id}/usershttps://api.us2.ddog-gov.com/api/v2/roles/{role_id}/usershttps://api.uk1.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.us3.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.us5.datadoghq.com/api/v2/roles/{role_id}/users

Add a user to a role

POST https://api.ap1.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.ap2.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.datadoghq.eu/api/v2/roles/{role_id}/usershttps://api.ddog-gov.com/api/v2/roles/{role_id}/usershttps://api.us2.ddog-gov.com/api/v2/roles/{role_id}/usershttps://api.uk1.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.us3.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.us5.datadoghq.com/api/v2/roles/{role_id}/users

Remove a user from a role

DELETE https://api.ap1.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.ap2.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.datadoghq.eu/api/v2/roles/{role_id}/usershttps://api.ddog-gov.com/api/v2/roles/{role_id}/usershttps://api.us2.ddog-gov.com/api/v2/roles/{role_id}/usershttps://api.uk1.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.us3.datadoghq.com/api/v2/roles/{role_id}/usershttps://api.us5.datadoghq.com/api/v2/roles/{role_id}/users

Create a new role by cloning an existing role

POST https://api.ap1.datadoghq.com/api/v2/roles/{role_id}/clonehttps://api.ap2.datadoghq.com/api/v2/roles/{role_id}/clonehttps://api.datadoghq.eu/api/v2/roles/{role_id}/clonehttps://api.ddog-gov.com/api/v2/roles/{role_id}/clonehttps://api.us2.ddog-gov.com/api/v2/roles/{role_id}/clonehttps://api.uk1.datadoghq.com/api/v2/roles/{role_id}/clonehttps://api.datadoghq.com/api/v2/roles/{role_id}/clonehttps://api.us3.datadoghq.com/api/v2/roles/{role_id}/clonehttps://api.us5.datadoghq.com/api/v2/roles/{role_id}/clone

List role templates preview

GET https://api.ap1.datadoghq.com/api/v2/roles/templateshttps://api.ap2.datadoghq.com/api/v2/roles/templateshttps://api.datadoghq.eu/api/v2/roles/templateshttps://api.ddog-gov.com/api/v2/roles/templateshttps://api.us2.ddog-gov.com/api/v2/roles/templateshttps://api.uk1.datadoghq.com/api/v2/roles/templateshttps://api.datadoghq.com/api/v2/roles/templateshttps://api.us3.datadoghq.com/api/v2/roles/templateshttps://api.us5.datadoghq.com/api/v2/roles/templates