• Home
  • Dynatrace API
  • Configuration
  • OneAgent configuration
  • In a host group
  • PUT auto-update configuration

OneAgent in a host group API - PUT auto-update configuration

Updates the configuration of OneAgent auto-update in the specified host group.

OneAgents installed on hosts of the host group use this configuration only when their setting is set to INHERITED.

The request consumes an application/json payload.

PUTManaged https://{your-domain}/e/{your-environment-id}/api/config/v1/hostgroups/{id}/autoupdate
SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/hostgroups/{id}/autoupdate
Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/hostgroups/{id}/autoupdate

Authentication

To execute this request, you need an access token with Write configuration (WriteConfig) scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
idstring

The Dynatrace entity ID of the required host group.

pathrequired
bodyHostGroupAutoUpdateConfig

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

bodyoptional

Request body objects

The HostGroupAutoUpdateConfig object

Configuration of OneAgent auto-update in a host group.

Applies to all OneAgents installed on hosts of the host group if their setting parameter is set to INHERITED. Otherwise, the host level setting applies.

ElementTypeDescription
metadataConfigurationMetadata

Metadata useful for debugging

Can be null.

idstring

The Dynatrace entity ID of the host group.

Can be null.

settingstring

The auto-update state of OneAgents in a host group:

  • ENABLED: OneAgents automatically update to the most recent version.
  • DISABLED: OneAgents update to the version specified in the version field.
  • INHERITED: The setting from the environment-wide configuration is used.

OneAgents installed on hosts of the host group use this configuration only when their setting parameter is set to INHERITED.

The element can hold these values
  • DISABLED
  • ENABLED
  • INHERITED
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.

Can be null.

updateWindowsUpdateWindowsConfig

Basic information about all configured maintenance windows

Can be null.

effectiveSettingstring

The actual state of the auto-update on the hosts in a host group.

Applicable only if the setting parameter is set to INHERITED. In that case the value is taken from the environment-wide setting.

The element can hold these values
  • ENABLED
  • DISABLED

Can be null.

effectiveVersionstring

The actual version to which the OneAgent must be updated.

Applicable only if the setting parameter is set to INHERITED. In that case the value is taken from the environment-wide setting.

Can be null.

The ConfigurationMetadata object

Metadata useful for debugging

ElementTypeDescription
configurationVersionsinteger[]

A sorted list of the version numbers of the configuration.

Can be null.

currentConfigurationVersionsstring[]

A sorted list of version numbers of the configuration.

Can be null.

clusterVersionstring

Dynatrace version.

Can be null.

The UpdateWindowsConfig object

Basic information about all configured maintenance windows

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

The UpdateWindow object

Basic information about one maintenance window

ElementTypeDescription
namestring

The name of maintenance window

Can be null.

idstring

Identifier of maintenance window

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": "HOST_GROUP-0123456789ABCDE", "setting": "DISABLED", "version": "1.181.0", "updateWindows": { "windows": [ { "name": "Daily maintenance window", "id": "vu9U3hXa3q0AAAABADdkeW5hdHJhY2Uuc2V0dGluZ3MuZGVwbG95bWVudC5tYW5h" } ] }, "effectiveSetting": "DISABLED", "effectiveVersion": "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.

POSTManaged https://{your-domain}/e/{your-environment-id}/api/config/v1/hostgroups/{id}/autoupdate/validator
SaaS https://{your-environment-id}.live.dynatrace.com/api/config/v1/hostgroups/{id}/autoupdate/validator
Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/hostgroups/{id}/autoupdate/validator

Authentication

To execute this request, you need an access token with Write configuration (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.