Credential vault API - PUT a set of credentials

Updates the specified set of credentials for synthetic HTTP monitors.

The request consumes and produces an application/json payload.

This request is an early adopter release and may be changed in non compatible way.

PUT
  • Managed https://{your-domain}/e/{your-environment-id}/api/config/v1/credentials/{id}
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/credentials/{id}

Parameters

Parameter Type Description In Required
id string

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

path required
body Credentials

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

body optional

The Credentials object

A set of credentials for synthetic monitors.

Element Type Description Required
name string

The name of the credentials set.

required
id string

The ID of the credentials set.

optional
description string

A short description of the credentials set..

required
ownerAccessOnly boolean

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

optional
type string

Defines the actual set of fields depending on the value:

CERTIFICATE -> CertificateCredentials USERNAME_PASSWORD -> UserPasswordCredentials TOKEN -> TokenCredentials

The type element can hold these values.
required

Possible values

Possible values for the type element in the Credentials object:

  • CERTIFICATE
  • USERNAME_PASSWORD
  • TOKEN

Response format

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

The CredentialsResponseElement object

Metadata of the credentials set.

Element Type Description
name string

The name of the credentials set.

id string

The ID of the credentials set.

type string

The type of the credentials set.

description string

A short description of the credentials set.

owner string

The owner of the credential.

ownerAccessOnly boolean

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

Response codes

Code Description
201

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.

400

Failed. The input is invalid.

Example

In this example, the request updates the set of credentials created in the POST request example.

It changes the username to mary.brown and the password to 4321dcba.

The API token is passed in the Authorization header.

You can download or copy the example request body to try it out on your own.

Curl

curl -X PUT \
  https://mySampleEnv.live.dynatrace.com/api/config/v1/credentials/CREDENTIALS_VAULT-1E6EA5075AF7E85D \
  -H 'Authorization: Api-token abcdefjhij1234567890' \
  -H 'Content-Type: application/json' \  
  -d '{
  "name": "RESTtest",
  "description": "Test credentials",
  "password": "4321dcba",
  "ownerAccessOnly": true,
  "type": "USERNAME_PASSWORD",
  "certificate": "mary.brown"
}'

Request URL

https://mySampleEnv.live.dynatrace.com/api/config/v1/credentials/CREDENTIALS_VAULT-1E6EA5075AF7E85D

Request body

api-examples/config/credentials-vault/put.json
Download
{
  "name": "RESTtest",
  "description": "Test credentials",
  "password": "4321dcba",
  "ownerAccessOnly": true,
  "type": "USERNAME_PASSWORD",
  "user": "mary.brown"
}

Response code

204