Manage users programmatically

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

General requirements

  • A Dynatrace Managed environment
  • A valid, enabled Davis Assistant API token with user management permissions
  • A system with network access to Davis Assistant on port 443
Notes
  • User management in Davis Assistant is only supported for Dynatrace Managed environments.
  • Only Davis Assistant environment admins are able to manage users.

Authorization

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

  • Create a new Davis Assistant API token in the Davis Assistant API configuration—in Davis Assistant Web, select Configurations from the navigation menu, then Davis Assistant API. Make sure to enable Can manage users when creating the token.

    Note

    If the token is invalid, the API returns a 401 Unauthorized status code. If you're attempting to perform an action that requires administrative privileges for the selected environment and lack these privileges, the API returns a 403 Forbidden status code.

    User management API token

GET users

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

POST user

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

PUT user

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

DELETE user

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