Update a credential entry in the Dynatrace Credential Vault by its ID, including its name, type, scopes, and access settings, with the Credential Vault API.
| PUT | SaaS | https://{your-environment-id}.apps.dynatrace.com/v1/entries/{entry-id} |
You use the entry-id path parameter to choose the credential entry and send its new values in the request body, such as name, type, description, scopes, and ownerAccessOnly. The body must not contain an ID. Updating an entry owned by another user requires credential-vault:entries:admin, and a 204 response confirms the update.
To execute this request, you need a platform token or OAuth access token with credential-vault:entries:write scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| entry-id | string | The ID of the credential entry to be updated. | path | Required |
| body | Credentials | The JSON body of the request. Contains updated parameters of the credential entry. | body | Required |
Credentials objectA 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 |
|---|---|---|---|
| allowContextlessRequests | boolean | Allow ad-hoc functions to access the credential details (requires the APP_ENGINE scope). | Optional |
| allowedEntities | Credential | 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. The element can hold these values
| Optional | |
| scopes | string[] | The set of scopes of the credentials set. Limitations: The element can hold these values
| Required |
| type | string | Defines the actual set of fields depending on the value. See one of the following objects:
The element can hold these values
| Required |
CredentialAccessData objectThe set of entities allowed to use the credential.
| Element | Type | Description | Required |
|---|---|---|---|
| id | string | - | Optional |
| type | string | -The element can hold these values
| Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"allowContextlessRequests": "false","allowedEntities": [{"id": "jane.doe@example.com","type": "USER"},{"id": "john.smith@example.com","type": "USER"},{"id": "my.with.credentials","type": "APPLICATION"}],"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"}
| Code | Type | Description |
|---|---|---|
| 204 | - | Success. The credential entry has been updated. The response doesn't have a body. |
| 4XX | Error | Client side error. |
| 5XX | Error | Server side error. |
ErrorResponseEnvelope objectEncloses the encountered error.
| Element | Type | Description |
|---|---|---|
| error | Error | Basic information of the encountered error. |
ErrorResponse objectBasic information of the encountered error.
| Element | Type | Description |
|---|---|---|
| code | integer | The returned HTTP status code. |
| details | Error | Detailed information of the error. |
| message | string | Description of the encountered error. |
ErrorResponseDetails objectDetailed information of the error.
| Element | Type | Description |
|---|---|---|
| type | string | Defines the actual set of fields depending on the value. See one of the following objects:
The element can hold these values
|
{"error": {"code": 1,"details": {"type": "constraintViolation"},"message": "string"}}