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.
PUT | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v2/credentials/{id} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/credentials/{id} | |
Environment and Cluster ActiveGate (default port 9999) | https://{your-activegate-domain}:9999/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.
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 | required |
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.
Element | Type | Description | Required |
---|---|---|---|
allowedEntities | CredentialAccessData[] | The set of entities allowed to use the credential. | optional |
description | string | A short description of the credentials set. | optional |
id | string | The ID of the credentials set. | optional |
name | string | The name of the credentials set. | required |
ownerAccessOnly | boolean | The credentials set is available to every user ( | optional |
string | DEPRECATED The scope of the credentials set.
| optional | |
scopes | string[] | The set of scopes of the credentials set.
| required |
type | string | Defines the actual set of fields depending on the value. See one of the following objects:
| optional |
The CredentialAccessData
object
The set of entities allowed to use the credential.
Element | Type | Description | Required |
---|---|---|---|
id | string | - | optional |
type | string | -
| 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.
1{2 "allowedEntities": [3 {4 "APPLICATION": "my.new.app",5 "USER": "jane.doe@example.com"6 }7 ],8 "description": "Sample set of credentials for API documentation",9 "name": "Sample credentials",10 "ownerAccessOnly": false,11 "password": "1234abcd",12 "scope": "SYNTHETIC",13 "scopes": [14 "SYNTHETIC",15 "EXTENSION_AUTHENTICATION"16 ],17 "type": "USERNAME_PASSWORD",18 "user": "john.smith@example.com"19}
Response
Response codes
Code | Type | Description |
---|---|---|
201 | CredentialsId | 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 | ErrorEnvelope | Failed. The input is invalid. |
Response body objects
The CredentialsId
object
A short representation of the credentials set.
Element | Type | Description |
---|---|---|
id | string | The ID of the credentials set. |
Response body JSON model
1{2 "id": "CREDENTIALS_VAULT-C43F2C2E6395AD23"3}