Set or update cluster proxy configuration

The ServiceProviderAPI (Service Provider API) Api-Token scope is required to set or update cluster proxy configuration using Dynatrace API.

Parameter

Parameter Type Description In Required
body InternetProxyChangeRequest body optional

Body format

The InternetProxyChangeRequest object

Configuration of proxy server for Internet connection

Element Type Description Required
scheme string

Protocol which proxy server uses

required
server string

Address (either IP or Hostname) of proxy server

required
port integer

Port of proxy server

required
user string

User of proxy server, null means do not change previous value

optional
password string

Password of proxy server, null means do not change previous value

optional
nonProxyHosts string[]

Definition of hosts for which proxy won't be used. You can define multiple hosts. Each host can start or end with wildcard '*' for instance to match whole domain.

optional

Response

Response codes

Code Description
201

Successful, new configuration created

204

Successful, configuration updated

400

Given proxy configuration is invalid

Response body

A successful request doesn't return any content.

Example

In this example, you add a proxy server (outbound-proxy.dynatrace.com) that uses port 8080 and requires a password, at the same time excluding an internal lab host (*.internal.lab.company.com).

Curl

curl -X PUT "https://myManaged.cluster.com/api/v1.0/onpremise/proxy/configuration" -H  "accept: */*" -H  "Content-Type: application/json" -d "{\"scheme\":\"http\",\"server\":\"outbound-proxy.dynatrace.com\",\"port\":8080,\"nonProxyHosts\":[\"https://mycompany.com/proxy/*\",\"*.internal.lab.company.com\"],\"userOrPasswordDefined\":true}"

Request URL

https://myManaged.cluster.com/api/v1.0/onpremise/proxy/configuration

Response body

{
  "code": 201,
  "message": "Successful, new configuration created."
}

Response code

201