OneAgent environment-wide configuration API - PUT auto-update configuration

Updates the environment-wide configuration of OneAgent auto-update.

OneAgents that connect to the environment use this configuration only when their setting is set to INHERITED.

The request consumes an application/json payload.

PUTSaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/hosts/autoupdate
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/hosts/autoupdate

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
bodyEnvironmentAutoUpdateConfig

The JSON body of the request. Contains OneAgent auto-update parameters.

bodyoptional

Request body objects

The EnvironmentAutoUpdateConfig object

Environment-wide configuration of OneAgents auto-updates.

Applies to all OneAgents connecting to the environment if their setting parameter is set to INHERITED. Otherwise, the host group or host level setting applies.

ElementTypeDescriptionRequired
metadataConfigurationMetadata

Metadata useful for debugging

optional
settingstring

The auto-update state of OneAgents connecting to the environment:

  • ENABLED: OneAgents automatically update to the most recent version.
  • DISABLED: OneAgents update to the version specified in the version field.

OneAgents that connect to the environment use this configuration only when their setting parameter is set to INHERITED.

  • ENABLED
  • DISABLED
required
targetVersionstring

Version to update a OneAgent to when automatic updates are enabled.

Supports relative versions latest, previous and older as well as specific version in <major>.<minor> format (for example 1.261) or <major>.<minor>.<revision>.<timestamp> format (for example 1.261.178.20230313-090930).

Only applicable when the setting parameter is set to ENABLED.

optional
updateWindowsUpdateWindowsConfig

Basic information about all configured maintenance windows

optional
versionstring

The version to which the OneAgent must be updated.

Specify the version in the <major>.<minor>.<revision> format (for example 1.181.0) or <major>.<minor> format (for example 1.181). You can fetch the list of available versions with the GET available versions call. If no suitable installer is found for the provided version or the value is set to null, OneAgent won't be updated.

Only applicable when the setting parameter is set to DISABLED.

optional

The ConfigurationMetadata object

Metadata useful for debugging

ElementTypeDescriptionRequired
clusterVersionstring

Dynatrace version.

optional
configurationVersionsinteger[]

A sorted list of the version numbers of the configuration.

optional
currentConfigurationVersionsstring[]

A sorted list of version numbers of the configuration.

optional

The UpdateWindowsConfig object

Basic information about all configured maintenance windows

ElementTypeDescriptionRequired
windowsUpdateWindow[]

List of maintenance windows when the OneAgent update can start. If there is no value and update should be performed, the update will start at earliest convenience.

required

The UpdateWindow object

Basic information about one maintenance window

ElementTypeDescriptionRequired
idstring

Identifier of maintenance window

required
namestring

The name of maintenance window

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.

{
"metadata": {
"clusterVersion": "1.192.1",
"configurationVersions": [
4,
2
],
"currentConfigurationVersions": [
"1.0.4",
"1.23"
]
},
"setting": "DISABLED",
"targetVersion": "latest",
"updateWindows": {
"windows": [
{
"id": "vu9U3hXa3q0AAAABADdkeW5hdHJhY2Uuc2V0dGluZ3MuZGVwbG95bWVudC5tYW5h",
"name": "Daily maintenance window"
}
]
},
"version": "1.181.0"
}

Response

Response codes

CodeTypeDescription
204-

Success. The configuration has been updated. Response doesn't have a body.

400ErrorEnvelope

Failed. The input is invalid.

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.

POSTSaaShttps://{your-environment-id}.live.dynatrace.com/api/config/v1/hosts/autoupdate/validator
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/config/v1/hosts/autoupdate/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-

Success. The submitted configuration is valid. Response doesn't have a body.

400ErrorEnvelope

Failed. The input is invalid.