Remote environments API - PUT a remote environment configuration
This API is deprecated. Use the Settings API instead. Look for the Remote environment (builtin:remote.environment
) schema.
Updates the specified remote environment configuration. If a configuration with the specified ID doesn't exist, a new one is created.
The request consumes and produces an application/json
payload.
PUT | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/remoteEnvironments/{id} |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/remoteEnvironments/{id} |
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
The ID of the configuration to be updated.
If you set the ID in the body as well, it must match this ID.
The JSON body of the request. Contains updated parameters of the remote environment configuration.
Request body objects
The RemoteEnvironmentConfigDto
object
The display name of the remote environment.
The ID of the configuration.
The network scope of the remote environment:
EXTERNAL
: The remote environment is located in an another network.INTERNAL
: The remote environment is located in the same network.CLUSTER
: The remote environment is located in the same cluster.
Dynatrace SaaS can only use EXTERNAL
.
If not set, EXTERNAL
is used.
CLUSTER
EXTERNAL
INTERNAL
The API token granting access to the remote environment.
The token must have the Fetch data from a remote environment (RestRequestForwarding
) scope.
For security reasons, GET requests return this field as null
.
The URI of the remote environment.
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.
{"displayName": "string","id": "string","networkScope": "EXTERNAL","token": "string","uri": "string"}
Response
Response codes
Success. A new remote environment configuration has been created. The response contains the ID of the new configuration.
Success. The configuration has been updated. The response doesn't have a body.
Response body objects
The RemoteEnvironmentConfigStub
object
The short representation of a remote environment.
The network scope of the remote environment:
EXTERNAL
: The remote environment is located in an another network.INTERNAL
: The remote environment is located in the same network.CLUSTER
: The remote environment is located in the same cluster.
Dynatrace SaaS can only use EXTERNAL
.
If not set, EXTERNAL
is used.
CLUSTER
EXTERNAL
INTERNAL
The display name of the remote environment.
Response body JSON model
{"id": "string","name": "string","networkScope": "CLUSTER","uri": "string"}
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.
POST | SaaS | https://{your-environment-id}.live.dynatrace.com/api/config/v1/remoteEnvironments/{id}/validator |
Environment ActiveGate | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/remoteEnvironments/{id}/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
Validated. The submitted configuration is valid. Response doesn't have a body
Example
In this example, the request updated the API token of the Pre-Production remote environment created in the POST request example.
The API token is passed in the Authorization header.
Curl
curl -X PUT \https://mySampleEnv.live.dynatrace.com/api/config/v1/remoteEnvironments/c89b9d9f-8c59-4c5b-b7ef-1a082d11e9ba \-H 'Accept: application/json' \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \-H 'Content-Type: application/json' \-d '{"displayName": "Pre-Production","uri": "https://preProd.live.dynatrace.com","token": "0987654321jihgfedcba","networkScope": "EXTERNAL"}'
Request URL
https://mySampleEnv.live.dynatrace.com/api/config/v1/remoteEnvironments/c89b9d9f-8c59-4c5b-b7ef-1a082d11e9ba
Request body
{"id": "c89b9d9f-8c59-4c5b-b7ef-1a082d11e9ba","displayName": "Pre-Production","uri": "https://PreProd.live.dynatrace.com","token": "0987654321jihgfedcba","networkScope": "INTERNAL"}
Response code
204