• Home
  • API
  • Environment
  • Credential vault
  • PUT a set of credentials

Credential vault API - PUT a set of credentials

Updates the specified set of credentials for synthetic monitors.

The request consumes and produces an application/json payload.

PUTManagedDynatrace 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.write scope.

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

Parameters

Refer to JSON models to find all JSON models that depend on the type of the model.

ParameterTypeDescriptionInRequired
idstring

The Dynatrace entity ID of the credentials set to be updated.

pathrequired
bodyCredentials

The JSON body of the request. Contains updated parameters of the credentials set.

bodyrequired

Request body objects

The Credentials object

A set of credentials for synthetic monitors.

The actual set of fields depends on the type of credentials. Find the list of actual objects in the description of the type field or see Credential vault API - JSON models.

ElementTypeDescriptionRequired
allowedEntitiesCredentialAccessData[]

The set of entities allowed to use the credential.

optional
descriptionstring

A short description of the credentials set.

optional
idstring

The ID of the credentials set.

optional
namestring

The name of the credentials set.

required
ownerAccessOnlyboolean

The credentials set is available to every user (false) or to owner only (true).

optional
scopestring

DEPRECATED

The scope of the credentials set.

The element can hold these values
  • ALL
  • EXTENSION
  • SYNTHETIC
  • UNKNOWN
required
scopesstring[]

The set of scopes of the credentials set.

The element can hold these values
  • ALL
  • EXTENSION
  • SYNTHETIC
  • UNKNOWN
required
typestring

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

  • CERTIFICATE -> CertificateCredentials
  • PUBLIC_CERTIFICATE -> PublicCertificateCredentials
  • USERNAME_PASSWORD -> UserPasswordCredentials
  • TOKEN -> TokenCredentials
The element can hold these values
  • CERTIFICATE
  • PUBLIC_CERTIFICATE
  • TOKEN
  • USERNAME_PASSWORD
optional

The CredentialAccessData object

The set of entities allowed to use the credential.

ElementTypeDescriptionRequired
idstring-optional
typestring-
The element can hold these values
  • APPLICATION
  • UNKNOWN
  • USER
optional

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

json
{ "allowedEntities": [ { "APPLICATION": "my.new.app", "USER": "jane.doe@example.com" } ], "description": "Sample set of credentials for API documentation", "name": "Sample credentials", "ownerAccessOnly": false, "password": "1234abcd", "scope": "SYNTHETIC", "scopes": [ "SYNTHETIC", "EXTENSION_AUTHENTICATION" ], "type": "USERNAME_PASSWORD", "user": "john.smith@example.com" }

Response

Response codes

CodeTypeDescription
201CredentialsId

Success. The new credentials set has been created. The response contains the ID of the set.

204

Success. The credentials set has been updated. Response doesn't have a body.

400ErrorEnvelope

Failed. The input is invalid.

Response body objects

The CredentialsId object

A short representation of the credentials set.

ElementTypeDescription
idstring

The ID of the credentials set.

Response body JSON model

json
{ "id": "CREDENTIALS_VAULT-C43F2C2E6395AD23" }
Related topics
  • Configure browser monitors

    Learn about configuring browser monitors and clickpaths.

  • Configure HTTP monitors

    Learn about configuring HTTP monitors.