Network zones API - PUT a network zone

Updates the specified network zone. If the network zone with the specified ID doesn't exist, a new network zone is created.

The request produces and consumes an application/json payload.

PUT

  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/networkZones/{id}

Authentication

To execute this request, you need the Write network zones (networkZones.write) permission assigned to your API token. To learn how to obtain and use it, see Authentication.

Parameters

ParameterTypeDescriptionInRequired
idstring

The ID of the network zone to be updated.

If you set the ID in the body as well, it must match this ID.

The ID is not case sensitive. Dynatrace stores the ID in lowercase.

pathrequired
bodyNetworkZone

The JSON body of the request. Contains parameters of the network zone.

bodyrequired

Request body objects

The NetworkZone object

Configuration of a network zone.

ElementTypeDescriptionRequired
alternativeZonesstring[]

A list of alternative network zones.

optional
descriptionstring

A short description of the network zone.

optional
fallbackModestring

The fallback mode of the network zone.

  • ANY_ACTIVE_GATE
  • NONE
  • ONLY_DEFAULT_ZONE
optional
idstring

The ID of the network zone.

optional
numOfConfiguredActiveGatesinteger

The number of ActiveGates in the network zone.

optional
numOfConfiguredOneAgentsinteger

The number of OneAgents that are configured to use the network zone as primary.

optional
numOfOneAgentsFromOtherZonesinteger

The number of OneAgents from other network zones that are using ActiveGates in the network zone.

This is a fraction of numOfOneAgentsUsing.

One possible reason for switching to another zone is that a firewall is preventing a OneAgent from connecting to any ActiveGate in the preferred network zone.

optional
numOfOneAgentsUsinginteger

The number of OneAgents that are using ActiveGates in the network zone.

optional
overridesGlobalboolean

Indicates if a global network zone is overridden (managed only).

optional
scopestring

Specifies the scope of the network zone (managed only).

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.

{
"alternativeZones": [
"string"
],
"description": "string",
"fallbackMode": "ANY_ACTIVE_GATE",
"id": "string",
"numOfConfiguredActiveGates": 1,
"numOfConfiguredOneAgents": 1,
"numOfOneAgentsFromOtherZones": 1,
"numOfOneAgentsUsing": 1,
"overridesGlobal": true,
"scope": "string"
}

Response

Response codes

CodeTypeDescription
201EntityShortRepresentation

Success. The new network zone has been created. The response body contains the ID of the new network zone.

204-

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

400ErrorEnvelope

Failed. The input is invalid.

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.

Response body objects

The EntityShortRepresentation object

The short representation of a Dynatrace entity.

ElementTypeDescription
descriptionstring

A short description of the Dynatrace entity.

idstring

The ID of the Dynatrace entity.

namestring

The name of the Dynatrace entity.

Response body JSON model

{
"description": "Dynatrace entity for the REST API example",
"id": "6a98d7bc-abb9-44f8-ae6a-73e68e71812a",
"name": "Dynatrace entity"
}