• Home
  • Dynatrace API
  • Configuration
  • Cloud Foundry credentials
  • POST credentials

Cloud Foundry credentials API - POST credentials

Creates a new credentials configuration.

The request consumes and produces an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/cloudFoundry/credentials
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/cloudFoundry/credentials
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/cloudFoundry/credentials

Authentication

To execute this request, you need an access token with WriteConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
bodyCloudFoundryCredentials

name, apiUrl and loginUrl must be unique.

bodyrequired

Request body objects

The CloudFoundryCredentials object

Configuration for specific Cloud Foundry credentials.

ElementTypeDescriptionRequired
metadataConfigurationMetadata

Metadata useful for debugging

optional
idstring

The ID of the given credentials configuration.

optional
activeboolean

The monitoring is enabled (true) or disabled (false) for given credentials configuration.

If not set on creation, the true value is used.

If the field is omitted during an update, the old value remains unaffected.

optional
endpointStatusstring

The status of the configured endpoint.

ASSIGNED: The credentials are assigned to an ActiveGate which is responsible for processing. UNASSIGNED: The credentials are not yet assigned to an ActiveGate so there is currently no processing. DISABLED: The credentials have been disabled by the user. FASTCHECK_AUTH_ERROR: The credentials are invalid. FASTCHECK_TLS_ERROR: The endpoint TLS certificate is invalid. FASTCHECK_NO_RESPONSE: The endpoint did not return a result until the timeout was reached. FASTCHECK_INVALID_ENDPOINT: The endpoint URL was invalid. FASTCHECK_AUTH_LOCKED: The credentials seem to be locked. UNKNOWN: An unknown error occured.

The element can hold these values
  • ASSIGNED
  • DISABLED
  • FASTCHECK_AUTH_ERROR
  • FASTCHECK_AUTH_LOCKED
  • FASTCHECK_INVALID_ENDPOINT
  • FASTCHECK_LOW_MEMORY_ERROR
  • FASTCHECK_NO_RESPONSE
  • FASTCHECK_TLS_ERROR
  • FASTCHECK_TOO_BIG_ENVIRONMENT
  • UNASSIGNED
  • UNKNOWN
optional
endpointStatusInfostring

The detailed status info of the configured endpoint.

optional
namestring

The name of the Cloud Foundry foundation credentials.

Allowed characters are letters, numbers, whitespaces, and the following characters: .+-_. Leading or trailing whitespace is not allowed.

required
apiUrlstring

The URL of the Cloud Foundry foundation credentials.

The URL must be valid according to RFC 2396.

Leading or trailing whitespaces are not allowed.

required
loginUrlstring

The login URL of the Cloud Foundry foundation credentials.

The URL must be valid according to RFC 2396.

Leading or trailing whitespaces are not allowed.

required
usernamestring

The username of the Cloud Foundry foundation credentials.

Leading and trailing whitespaces are not allowed.

required
passwordstring

The password of the Cloud Foundry foundation credentials.

optional

The ConfigurationMetadata object

Metadata useful for debugging

ElementTypeDescriptionRequired
configurationVersionsinteger[]

A sorted list of the version numbers of the configuration.

optional
currentConfigurationVersionsstring[]

A sorted list of version numbers of the configuration.

optional
clusterVersionstring

Dynatrace version.

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.

json
{ "metadata": { "configurationVersions": [ 4, 2 ], "currentConfigurationVersions": [ "1.0.4", "1.23" ], "clusterVersion": "1.192.1" }, "id": "string", "active": true, "endpointStatus": "ASSIGNED", "endpointStatusInfo": "string", "name": "string", "apiUrl": "string", "loginUrl": "string", "username": "string", "password": "string" }

Response

Response codes

CodeTypeDescription
201EntityShortRepresentation

Success. Cloud Foundry foundation credentials have been created. The ID and name of the new credentials are returned.

400ErrorEnvelope

Failed. The input is invalid.

Response body objects

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

ElementTypeDescription
idstring

The ID of the Dynatrace entity.

namestring

The name of the Dynatrace entity.

descriptionstring

A short description of the Dynatrace entity.

Response body JSON model

json
{ "id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a", "name": "Dynatrace entity", "description": "Dynatrace entity for the REST API example" }

Validate payload

We recommend that you validate the payload before submitting it with an actual request. A response code of 204 indicates a valid payload.

The request consumes an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/config/v1/cloudFoundry/credentials/validator
SaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/cloudFoundry/credentials/validator
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/cloudFoundry/credentials/validator

Authentication

To execute this request, you need an access token with WriteConfig scope.

To learn how to obtain and use it, see Tokens and authentication.

Response

Response codes

CodeTypeDescription
204

Validated. The submitted credentials are valid. Response does not have a body.

400ErrorEnvelope

Failed. The input is invalid.

Related topics
  • Set up Dynatrace on Cloud Foundry

    Set up and configure Dynatrace on Cloud Foundry.