Creates a new service user in your Dynatrace account.
The request consumes and produces an application/json payload.
POST
https://api.dynatrace.com/iam/v1/accounts/{accountUuid}/service-users
To execute this request, you need the Allow write access for identity resources (users and groups) (account-idm-write) scope assigned to your token. To learn how to obtain and use it, see OAuth clients.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| accountUuid | string | The ID of the required account. You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client. | path | Required |
| body | Service | The JSON body of the request. Contains the name of the new service user. | body | Required |
ServiceUserDto object| Element | Type | Description | Required |
|---|---|---|---|
| name | string | The name of the new service user | Required |
| description | string | The description of the new service user | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"name": "string","description": "string"}
| Code | Type | Description |
|---|---|---|
| 201 | External | Success. The new service user has been created. The response contains service user details. |
ExternalServiceUserWithGroupUuidDto object| Element | Type | Description |
|---|---|---|
| uid | string | UUID of service user |
| string | Email of service user | |
| name | string | Name of service user |
| surname | string | Surname of service user |
| description | string | The description of the service user |
| createdAt | string | The date and time when the user was created in |
| groupUuid | string | Uuid of the group which enables assigning policy to service user |
{"uid": "string","email": "string","name": "string","surname": "string","description": "string","createdAt": "string","groupUuid": "string"}
In this example, the request creates a new service user with the name new-service-user, in the account with accountUuid 2b794097-8ad2-4b32-b923-0131da2eeddf.
curl -X 'POST' \'https://api.dynatrace.com/iam/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/service-users' \-H 'accept: application/json' \-H 'Authorization: Bearer eywedGciOiJFUzI1NiIsInR7cCI6IkpCDVIsImtpZCI6IjEifQ' \-H 'Content-Type: application/json' \-d '{"name": "new-service-user","description": "New user desc"}'
https://api.dynatrace.com/iam/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/service-users
{"name": "new-service-user","description": "New user desc"}
[{"uid": "e2dbb9d3-1a2b-4cde-9f01-23456789abcd","email": "e2dbb9d3-1a2b-4cde-9f01-23456789abcd@service.sso.dynatrace.com","name": "New user desc","surname": "SERVICE_IDENTITY","type": "SERVICE_EXTERNAL","userStatus": "ACTIVE","description": "","createdAt": "2024-10-10T07:44:38Z"}]
201