• Home
  • Dynatrace API
  • Environment
  • Remote configuration management
  • OneAgent
  • POST a configuration job

OneAgent remote configuration management API - POST a configuration job

The request consumes an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v2/oneagents/remoteConfigurationManagement
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/oneagents/remoteConfigurationManagement
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/oneagents/remoteConfigurationManagement

Authentication

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

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

Parameters

You identify your OneAgents by their IDs. Use the OneAgent on a host request to learn the IDs of OneAgents that you'd like to configure.

ParameterTypeDescriptionInRequired
restartboolean

When set to false, OneAgents will not be restarted after the configuration is applied.

queryoptional
bodyRemoteConfigurationManagementOperationOneAgentRequest

JSON body of the request, containing remote configuration management job definition.

bodyrequired

Request body objects

The RemoteConfigurationManagementOperationOneAgentRequest object

Remote configuration management operation creation request.

ElementTypeDescriptionRequired
entitiesstring[]

A list of entities IDs for which remote configuration management is to be executed.

required
operationsRemoteConfigurationManagementOperation[]

A list of remote configuration management operations to be executed.

required

The RemoteConfigurationManagementOperation object

Definition of a single remote configuration management operation.

ElementTypeDescriptionRequired
attributestring

The attribute which is affected by the operation.

The element can hold these values
  • group
  • hostGroup
  • networkZone
required
valuestring

The value which should be assigned to given attribute.

optional
operationstring

The operation performed on given attribute.

The element can hold these values
  • clear
  • set
required

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
{ "entities": [ "HOST-D454A967666E7970", "HOST-811760CFF2A5E872" ], "operations": [ { "attribute": "networkZone", "value": "exampleNetworkZoneName", "operation": "set" } ] }

Response

Response codes

CodeTypeDescription
201RemoteConfigurationManagementJob

Created

400RemoteConfigurationManagementValidationResult

Failed. The input is invalid.

409

Other remote configuration management job is currently being executed

Response body objects

The RemoteConfigurationManagementJob object

Remote configuration management job.

ElementTypeDescription
processedEntitiesCountinteger

Number of entities that were already processed at the time the response was created.

timeoutTimestring

Date (in ISO 8601 format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z') when the running remote configuration management job will time-out. This field is present only for running jobs.

totalEntitiesCountinteger

Total number of entities to process.

operationsRemoteConfigurationManagementOperation[]

A list of executed remote configuration management jobs.

entityTypestring

Type of entities modified by remote configuration management.

The element can hold these values
  • ACTIVE_GATE
  • ONE_AGENT
idstring

The ID of the remote configuration management job.

startTimestring

Date (in ISO 8601 format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z') when the remote configuration management job was started.

endTimestring

Date (in ISO 8601 format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z') when the remote configuration management job was finished. This field is present only for finished jobs.

The RemoteConfigurationManagementOperation object

Definition of a single remote configuration management operation.

ElementTypeDescription
attributestring

The attribute which is affected by the operation.

The element can hold these values
  • group
  • hostGroup
  • networkZone
valuestring

The value which should be assigned to given attribute.

operationstring

The operation performed on given attribute.

The element can hold these values
  • clear
  • set

Response body JSON model

json
{ "processedEntitiesCount": 1, "timeoutTime": "2020-11-05T08:15:30.144Z", "totalEntitiesCount": 1, "operations": [ { "attribute": "networkZone", "value": "exampleNetworkZoneName", "operation": "set" } ], "entityType": "ACTIVE_GATE or ONE_AGENT", "id": "7974003406714390819", "startTime": "2020-11-05T08:15:30.144Z", "endTime": "2020-11-05T08:15:30.144Z" }

The response is not sent to the client until all OneAgents defined in the payload are processed. A OneAgent is considered to be processed when the reconfiguration message is sent to it; the actual reconfiguration is handled independently by the OneAgent.

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/v2/oneagents/remoteConfigurationManagement/validator
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/oneagents/remoteConfigurationManagement/validator
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/oneagents/remoteConfigurationManagement/validator

Authentication

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

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

Response

Response codes

CodeTypeDescription
204

Success. Response doesn't have a body.

400RemoteConfigurationManagementValidationResult

Failed. The input is invalid.