Credential vault API - GET all credentials
Lists all credentials for synthetic monitors stored in your environment.
The request produces an application/json
payload.
GET | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v2/credentials |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/credentials | |
Environment and Cluster ActiveGate (default port 9999) | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/credentials |
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
Parameter | Type | Description | In | Required |
---|---|---|---|---|
type | string | Filters the result by the specified credentials type.
| query | optional |
name | string | Filters the result by the name. When in quotation marks, whole phrase is taken. Case insensitive. | query | optional |
user | string | Filters credentials accessible to the user (owned by the user or the ones that are accessible for all). | query | optional |
scope | string | Filters credentials with specified scope. | query | optional |
nextPageKey | string | The cursor for the next page of results. You can find it in the nextPageKey field of the previous response. The first page is always returned if you don't specify the nextPageKey query parameter. When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters. | query | optional |
pageSize | integer | The amount of credentials in a single response payload. The maximal allowed page size is 500. If not set, 100 is used. | query | optional |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | CredentialsList | Success |
400 | ErrorEnvelope | Failed. The input is invalid. |
Response body objects
The CredentialsList
object
A list of credentials sets for Synthetic monitors.
Element | Type | Description |
---|---|---|
credentials | CredentialsResponseElement[] | A list of credentials sets for Synthetic monitors. |
nextPageKey | string | - |
pageSize | integer | - |
totalCount | integer | - |
The CredentialsResponseElement
object
Metadata of the credentials set.
Element | Type | Description |
---|---|---|
allowedEntities | CredentialAccessData[] | The set of entities allowed to use the credential. |
credentialUsageSummary | CredentialUsageHandler[] | The list contains summary data related to the use of credentials. |
description | string | A short description of the credentials set. |
externalVault | ExternalVaultConfig | Configuration for external vault synchronization for username and password credentials. |
id | string | The ID of the credentials set. |
name | string | The name of the credentials set. |
owner | string | The owner of the credential (user for which used API token was created). |
ownerAccessOnly | boolean | Flag indicating that this credential is visible only to the owner. |
scope | string | The scope of the credentials set.
|
scopes | string[] | The set of scopes of the credentials set.
|
type | string | The type of the credentials set.
|
The CredentialAccessData
object
The set of entities allowed to use the credential.
Element | Type | Description |
---|---|---|
id | string | - |
type | string | -
|
The CredentialUsageHandler
object
Keeps information about credential's usage.
Element | Type | Description |
---|---|---|
count | integer | The number of uses. |
type | string | Type of usage. |
The ExternalVaultConfig
object
Configuration for external vault synchronization for username and password credentials.
Element | Type | Description |
---|---|---|
credentialsUsedForExternalSynchronization | string[] | - |
passwordSecretName | string | - |
sourceAuthMethod | string | Defines the actual set of fields depending on the value. See one of the following objects:
|
tokenSecretName | string | - |
type | string | -
|
usernameSecretName | string | - |
vaultUrl | string | - |
Response body JSON model
1{2 "credentials": [3 {4 "credentialUsageSummary": [5 {6 "HTTP_MONITOR": 47 }8 ],9 "description": "Sample credentials for demo purposes",10 "id": "CREDENTIALS_VAULT-E80203F993472E6D",11 "name": "Sample username-password credentials",12 "owner": "admin",13 "ownerAccessOnly": true,14 "scope": "SYNTHETIC",15 "type": "USERNAME_PASSWORD"16 },17 {18 "credentialUsageSummary": [],19 "description": "Sample credentials for demo purposes",20 "id": "CREDENTIALS_VAULT-842DEF439999E15B",21 "name": "Sample certificate credentials",22 "owner": "John.Doe@domain.com",23 "ownerAccessOnly": true,24 "scope": "EXTENSION",25 "type": "CERTIFICATE"26 },27 {28 "credentialUsageSummary": [29 {30 "BROWSER_MONITOR": 11,31 "HTTP_MONITOR": 432 }33 ],34 "description": "Sample token for demo purposes",35 "id": "CREDENTIALS_VAULT-854345639999E15B",36 "name": "Sample token credentials",37 "owner": "John.Doe@domain.com",38 "ownerAccessOnly": true,39 "scope": "SYNTHETIC",40 "type": "TOKEN"41 }42 ]43}