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 Authentication.

Parameters

Parameter Type Description In Required
type string

Filters the result by the specified credentials type.

The type element can hold these values.
query optional

Possible values

Possible values for the type element:

  • CERTIFICATE
  • USERNAME_PASSWORD
  • TOKEN

Response format

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.

The type element can hold these values.
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.

Possible values

Possible values for the type element in the CredentialsResponseElement object:

  • CERTIFICATE
  • TOKEN
  • UNKNOWN
  • USERNAME_PASSWORD

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