How do I manage users programmatically?

Learn how to automate user management tasks using the Davis API.

General requirements

  • A Dynatrace Managed environment
  • A valid, enabled Davis API token with admin permissions
  • A system with network access to Davis on port 443

Note: User management within Davis is only supported for Dynatrace Managed environments.

Authorization

  • All requests must include the Authorization header that includes a Davis API token.

  • Create a new Davis API token in the Davis API configuration settings (Within Davis, go to Account settings > Integrations > Davis API).

Note: You must be an administrator of the active environment to access the Davis API configuration settings. If the token is invalid, the API will return a 401 Unauthorized status code. If you're attempting to perform an action that requires administrative privileges for the active environment, and you lack these privileges, the API will return a 403 Forbidden status code.

GET users

URL https://davis.dynatrace.com/api/v2/tenant/users
Method GET
Header Authorization: api-token ${DAVIS API TOKEN}

POST user

URL https://davis.dynatrace.com/api/v2/tenant/users/${EMAIL ADDRESS}
Method POST
Header Content-Type: application/json
Header Authorization: api-token ${DAVIS API TOKEN}

PUT user

URL https://davis.dynatrace.com/api/v2/tenant/users/${EMAIL ADDRESS}
Method PUT
Header Content-Type: application/json
Header Authorization: api-token ${DAVIS API TOKEN}

DELETE user

URL https://davis.dynatrace.com/api/v2/tenant/users/${EMAIL ADDRESS}
Method PUT
Header Content-Type: application/json
Header Authorization: api-token ${DAVIS API TOKEN}