User management API - GET user groups
Gets the information about user's group membership.
The request produces an application/json
payload.
GET |
|
Authentication
To execute this request, you need the Allow read access for identity resources (users and groups) (account-idm-read
) scope assigned to your token. To learn how to obtain and use it, see Authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
accountUuid | string | The ID of the required account. You can find the UUID on the Account > Account management API page, during creation of an OAuth client. | path | required |
string | The email address of the required user. | path | required |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | GroupUserDto | Success. The response contains the groups of the user. |
Response body objects
The GroupUserDto
object
Element | Type | Description |
---|---|---|
uid | string | The UUID of the user. |
string | The email address of the user. | |
name | string | The first name of the user. |
surname | string | The last name of the user. |
userStatus | string | The status of this user in Dynatrace:
|
emergencyContact | boolean | The user is ( |
groups | AccountGroupDto[] | A list of groups of which the user is a member. |
The AccountGroupDto
object
Element | Type | Description |
---|---|---|
groupName | string | The name of the user group. |
uuid | string | The UUID of the user group. |
owner | string | The identity provider from which the group originates.
|
accountUUID | string | The UUID of the Dynatrace account. |
accountName | string | The name of the Dynatrace account. |
description | string | A short description of the group. |
createdAt | string | The date and time of the group creation in |
updatedAt | string | The date and time of the most recent modification to the group in |
Response body JSON model
1{2 "uid": "string",3 "email": "string",4 "name": "string",5 "surname": "string",6 "userStatus": "ACTIVE",7 "emergencyContact": true,8 "groups": [9 {10 "groupName": "string",11 "uuid": "string",12 "owner": "LOCAL",13 "accountUUID": "string",14 "accountName": "string",15 "description": "string",16 "createdAt": "string",17 "updatedAt": "string"18 }19 ]20}
Example
In this example, the reuqest gets the group membership of the user with the john.smith@company.com email address. The result is truncated to three entries.
Curl
1curl --request GET \2 --url 'https://api.dynatrace.com/iam/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/users/john.smith@company.com' \3 --header 'Authorization: Bearer abcdefjhij1234567890'
Request URL
1https://api.dynatrace.com/iam/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/users/john.smith@company.com
Response body
1{2 "uid": "a5f4a0df-ca5a-47c6-a7c1-d2ac95cf1550",3 "email": "john.smith@company.com",4 "groups": [5 {6 "groupName": "Confidential data admin",7 "uuid": "541802b0-623c-4193-8728-036ed01d4eb4",8 "owner": "LOCAL",9 "description": null,10 "hidden": false,11 "accountUUID": "2b794097-8ad2-4b32-b923-0131da2eeddf",12 "accountName": "Dynatrace",13 "createdAt": "2020-03-11T03:01:01Z",14 "updatedAt": "2020-03-11T03:01:01Z"15 },16 {17 "groupName": "Monitoring viewer",18 "uuid": "7a1d224d-0ebc-4318-ab1e-64b217b7c156",19 "owner": "LOCAL",20 "description": null,21 "hidden": false,22 "accountUUID": "2b794097-8ad2-4b32-b923-0131da2eeddf",23 "accountName": "Dynatrace",24 "createdAt": "2020-03-11T03:01:01Z",25 "updatedAt": "2020-03-11T03:01:01Z"26 },27 {28 "groupName": "Monitoring admin",29 "uuid": "f335c6ae-f046-48ad-a0a2-49bb8fdca07b",30 "owner": "LOCAL",31 "description": null,32 "hidden": false,33 "accountUUID": "2b794097-8ad2-4b32-b923-0131da2eeddf",34 "accountName": "Dynatrace",35 "createdAt": "2020-03-11T03:01:01Z",36 "updatedAt": "2020-03-11T03:01:01Z"37 },38 {39 "groupName": "Account manager",40 "uuid": "56d56aba-c12f-44c1-a0ba-42eba3e3ff84",41 "owner": "LOCAL",42 "description": null,43 "hidden": false,44 "accountUUID": "2b794097-8ad2-4b32-b923-0131da2eeddf",45 "accountName": "Dynatrace",46 "createdAt": "2020-03-11T03:01:01Z",47 "updatedAt": "2020-03-11T03:01:01Z"48 }49 ],50 "emergencyContact": false,51 "userStatus": "ACTIVE"52}
Response code
200