• Home
  • Dynatrace API
  • Environment
  • Credential vault
  • GET credentials metadata

Credential vault API - GET credentials metadata

Gets the metadata of the specified set of credentials for synthetic monitors. The credentials set itself (username/certificate and password) is not included in the response. To retrieve it, use the GET credentials details call.

The request produces an application/json payload.

GETManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v2/credentials/{id}
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/credentials/{id}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/credentials/{id}

Authentication

To execute this request, you need an access token with credentialVault.read scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
idstring

The Dynatrace entity ID of the required credentials set.

pathrequired

Response

Response codes

CodeTypeDescription
200CredentialsResponseElement

Success. The response contains the metadata of the credentials set.

Response body objects

The CredentialsResponseElement object

Metadata of the credentials set.

ElementTypeDescription
namestring

The name of the credentials set.

idstring

The ID of the credentials set.

descriptionstring

A short description of the credentials set.

ownerstring

The owner of the credential (user for which used API token was created).

ownerAccessOnlyboolean

Flag indicating that this credential is visible only to the owner.

scopestring

The scope of the credentials set.

The element can hold these values
  • ALL
  • EXTENSION
  • SYNTHETIC
  • UNKNOWN
externalVaultExternalVaultConfig

Configuration for external vault synchronization for username and password credentials.

credentialUsageSummaryCredentialUsageHandler[]

The list contains summary data related to the use of credentials.

typestring

The type of the credentials set.

The element can hold these values
  • CERTIFICATE
  • PUBLIC_CERTIFICATE
  • TOKEN
  • UNKNOWN
  • USERNAME_PASSWORD

The ExternalVaultConfig object

Configuration for external vault synchronization for username and password credentials.

ElementTypeDescription
sourceAuthMethodstring

Defines the actual set of fields depending on the value. See one of the following objects:

  • HASHICORP_VAULT_APPROLE -> HashicorpApproleConfig
  • HASHICORP_VAULT_CERTIFICATE -> HashicorpCertificateConfig
  • AZURE_KEY_VAULT_CLIENT_SECRET -> AzureClientSecretConfig
The element can hold these values
  • AZURE_KEY_VAULT_CLIENT_SECRET
  • HASHICORP_VAULT_APPROLE
  • HASHICORP_VAULT_CERTIFICATE
vaultUrlstring-
usernameSecretNamestring-
passwordSecretNamestring-
tokenSecretNamestring-
credentialsUsedForExternalSynchronizationstring[]-
typestring-
The element can hold these values
  • AZURE_CERTIFICATE_MODEL
  • AZURE_CLIENT_SECRET_MODEL
  • HASHICORP_APPROLE_MODEL
  • HASHICORP_CERTIFICATE_MODEL

The CredentialUsageHandler object

Keeps information about credential's usage.

ElementTypeDescription
typestring

Type of usage.

countinteger

The number of uses.

Response body JSON model

json
{ "name": "Sample username-password credentials", "id": "CREDENTIALS_VAULT-C43F2C2E6395AD23", "type": "USERNAME_PASSWORD", "description": "Sample credentials for demo purposes.", "owner": "user@domain.com", "ownerAccessOnly": true, "scope": "SYNTHETIC", "externalVault": { "sourceAuthMethod": "HASHICORP_VAULT_APPROLE", "vaultUrl": "https://vault-cluster.vault.fb17d2fc-be92-4230-afa2-91dbfda3cbad.aws.hashicorp.cloud:8200", "usernameSecretName": "username", "passwordSecretName": "password", "pathToCredentials": "kv/credentials", "roleId": "00e4858c-ec33-bc99-4e7e-34de6967de6c", "secretId": "CREDENTIALS_VAULT-XXXXXXXXXXXXXXXX", "vaultNamespace": "admin" }, "credentialUsageSummary": [ { "HTTP_MONITOR": 3, "BROWSER_MONITOR": 2 } ] }
Related topics
  • Configure browser monitors

    Learn about configuring browser monitors and clickpaths.

  • Configure HTTP monitors

    Learn about configuring HTTP monitors.