Credential vault API - GET all credentials

Lists all credentials for synthetic monitors stored in your environment.

The request produces an application/json payload.

Early Adopter

This request is an Early Adopter release and may be changed in non-compatible way.

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

Authentication

To execute this request, you need the Read credential vault entries (credentialVault.read) permission assigned to your API token. 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

Response

Response codes

Code Description
200

Success

Response body

The CredentialsList object

A list of credentials sets for Synthetic monitors.

Element Type Description
credentials CredentialsResponseElement[]

A list of credentials sets for Synthetic monitors.

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 (user for which used API token was created).

ownerAccessOnly boolean

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

Example

In this example, the request lists all credentials of the USERNAME_PASSWORD type from the mySampleEnv environment.

The API token is passed in the Authorization header.

The result is truncated to two entries.

Curl

curl -X GET \
  'https://mySampleEnv.live.dynatrace.com/api/config/v1/credentials/?type=USERNAME_PASSWORD' \
  -H 'Authorization: Api-token abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/config/v1/credentials/?type=USERNAME_PASSWORD

Response body

{
  "credentials": [
    {
      "name": "easyTravel",
      "id": "CREDENTIALS_VAULT-9415C41E3649FE3C",
      "type": "USERNAME_PASSWORD",
      "description": "Credentials for easyTravel test app"
    },
    {
      "name": "google.com",
      "id": "CREDENTIALS_VAULT-E6D8ED717C9689B2",
      "type": "USERNAME_PASSWORD",
      "description": "google.com"
    }
  ]
}

Response code

200