Skip to main content

Classic environment v2

  • Reference

Documentation of the Dynatrace Environment API v2. Resources here generally supersede those in v1. Migration of resources from v1 is in progress.

If you miss a resource, consider using the Dynatrace Environment API v1.

To read about use cases and examples, see Dynatrace Documentation.

Notes about compatibility:

  • Operations marked as early adopter or preview may be changed in non-compatible ways, although we try to avoid this.
  • We may add new enum constants without incrementing the API version; thus, clients need to handle unknown enum constants gracefully.
Latest (V9)
npm install @dynatrace-sdk/client-classic-environment-v2

accessTokensActiveGateTokensClient​

import { accessTokensActiveGateTokensClient } from '@dynatrace-sdk/client-classic-environment-v2';

createToken​

accessTokensActiveGateTokensClient.createToken(config): Promise<ActiveGateTokenCreated>

Creates a new ActiveGate token

One of the following scopes is required:

  • environment-api:activegate-tokens:create
  • environment-api:activegate-tokens:write
  • fleet-management:activegate.tokens:create
  • fleet-management:activegate.tokens:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegate.tokens:write

The newly created token will be owned by the same user who owns the token used for authentication of the call.

Parameters​

NameType
config.body*requiredActiveGateTokenCreate

Returns​

Return typeStatus codeDescription
ActiveGateTokenCreated201Success. The token has been created. The body of the response contains the token secret.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { accessTokensActiveGateTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensActiveGateTokensClient.createToken({
    body: {
      activeGateType: "ENVIRONMENT",
      name: "myToken",
    },
  });

getToken​

accessTokensActiveGateTokensClient.getToken(config): Promise<ActiveGateToken>

Gets metadata of an ActiveGate token

One of the following scopes is required:

  • environment-api:activegate-tokens:read
  • fleet-management:activegate.tokens:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegate.tokens:read

The token secret is not exposed.

Parameters​

NameTypeDescription
config.activeGateTokenIdentifier*requiredstringThe ActiveGate token identifier, consisting of prefix and public part of the token.

Returns​

Return typeStatus codeDescription
ActiveGateToken200Success. The response contains the metadata of the tokens.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { accessTokensActiveGateTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensActiveGateTokensClient.getToken({
    activeGateTokenIdentifier: "...",
  });

listTokens​

accessTokensActiveGateTokensClient.listTokens(config): Promise<ActiveGateTokenList>

Lists all available ActiveGate tokens

One of the following scopes is required:

  • environment-api:activegate-tokens:read
  • fleet-management:activegate.tokens:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegate.tokens:read

You can limit the output by using pagination:

  1. Specify the number of results per page in the pageSize query parameter.
  2. Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.

Parameters​

NameTypeDescription
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of ActiveGate tokens in a single response payload.

The maximal allowed page size is 3000 and the minimal size is 100.

If not set, 100 is used.

Returns​

Return typeStatus codeDescription
ActiveGateTokenList200Success. The response contains the list of ActiveGate tokens.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { accessTokensActiveGateTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensActiveGateTokensClient.listTokens();

revokeToken​

accessTokensActiveGateTokensClient.revokeToken(config): Promise<void>

Deletes an ActiveGate token

One of the following scopes is required:

  • environment-api:activegate-tokens:write
  • fleet-management:activegate.tokens:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegate.tokens:write

Parameters​

NameTypeDescription
config.activeGateTokenIdentifier*requiredstringThe ActiveGate token identifier, consisting of prefix and public part of the token to be deleted.

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { accessTokensActiveGateTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensActiveGateTokensClient.revokeToken({
    activeGateTokenIdentifier: "...",
  });

accessTokensAgentTokensClient​

import { accessTokensAgentTokensClient } from '@dynatrace-sdk/client-classic-environment-v2';

getAgentConnectionToken​

accessTokensAgentTokensClient.getAgentConnectionToken(config): Promise<AgentConnectionToken>

Gets the agent connection token | maturity=EARLY_ADOPTER

One of the following scopes is required:

  • environment-api:agent-connection-tokens:read
  • fleet-management:oneagent.tokens:read

One of the following permissions is required:

  • environment:roles:agent-install
  • fleet-management:oneagent.tokens:read

Returns the agent connection token.

Returns​

Return typeStatus codeDescription
AgentConnectionToken200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { accessTokensAgentTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensAgentTokensClient.getAgentConnectionToken();

accessTokensApiTokensClient​

import { accessTokensApiTokensClient } from '@dynatrace-sdk/client-classic-environment-v2';

createApiToken​

⚠️ Deprecated

accessTokensApiTokensClient.createApiToken(config): Promise<ApiTokenCreated>

Creates a new API token

One of the following scopes is required:

  • environment-api:api-tokens:write
  • api-tokens:tokens:write

One of the following permissions is required:

  • environment:roles:viewer
  • api-tokens:tokens:write

The newly created token will be owned by the same user who owns the token used for authentication of the call.

Creating personal access tokens requires the environment:roles:viewer permission. Creating access tokens requires the environment:roles:manage-settings permission.

Parameters​

NameType
config.body*requiredApiTokenCreate

Returns​

Return typeStatus codeDescription
ApiTokenCreated201Success. The token has been created. The body of the response contains the token secret.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensApiTokensClient.createApiToken({
    body: { name: "tokenName", scopes: ["metrics.read"] },
  });

deleteApiToken​

⚠️ Deprecated

accessTokensApiTokensClient.deleteApiToken(config): Promise<void>

Deletes an API token

One of the following scopes is required:

  • environment-api:api-tokens:write
  • api-tokens:tokens:write

One of the following permissions is required:

  • environment:roles:viewer
  • api-tokens:tokens:write

Parameters​

NameTypeDescription
config.id*requiredstring

The ID of the token to be deleted.

You can specify either the ID or the secret of the token.

You can't delete the token you're using for authentication of the request.

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. You can't delete the token you're using for authentication of the request. | Client side error. | Server side error.

Code example

import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensApiTokensClient.deleteApiToken({
    id: "...",
  });

getApiToken​

⚠️ Deprecated

accessTokensApiTokensClient.getApiToken(config): Promise<ApiToken>

Gets API token metadata by token ID

One of the following scopes is required:

  • environment-api:api-tokens:read
  • api-tokens:tokens:read

One of the following permissions is required:

  • environment:roles:viewer
  • api-tokens:tokens:read

The token secret is not exposed.

Parameters​

NameType
config.id*requiredstring

Returns​

Return typeStatus codeDescription
ApiToken200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await accessTokensApiTokensClient.getApiToken({
  id: "...",
});

listApiTokens​

⚠️ Deprecated

accessTokensApiTokensClient.listApiTokens(config): Promise<ApiTokenList>

Lists all available API tokens

One of the following scopes is required:

  • environment-api:api-tokens:read
  • api-tokens:tokens:read

One of the following permissions is required:

  • environment:roles:viewer
  • api-tokens:tokens:read

You can limit the output by using pagination:

  1. Specify the number of results per page in the pageSize query parameter.
  2. Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.

Parameters​

NameTypeDescription
config.apiTokenSelectorstring

Filters the resulting sets of tokens. Only tokens matching the specified criteria are included into response.

You can set one or more of the following criteria:

  • Owner: owner("value"). The user that owns the token. Case-sensitive.
  • Personal access token: personalAccessToken(false). Set to true to include only personal access tokens or to false to include only API tokens.
  • Token scope: scope("scope1","scope2"). If several values are specified, the OR logic applies.

To set multiple criteria, separate them with commas (,). Only results matching all criteria are included into response.

config.fieldsstring

Specifies the fields to be included in the response.

The following fields are included by default:

  • id
  • name
  • enabled
  • owner
  • creationDate

To remove fields from the response, specify them with the minus (-) operator as a comma-separated list (for example, -creationDate,-owner).

You can include additional fields:

  • personalAccessToken

  • expirationDate

  • lastUsedDate

  • lastUsedIpAddress

  • modifiedDate

  • scopes

  • additionalMetadata

To add fields to the response, specify them with the plus (+) operator as a comma-separated list (for example, +expirationDate,+scopes). You can combine adding and removing of fields (for example, +scopes,-creationDate).

Alternatively, you can define the desired set of fields in the response. Specify the required fields as a comma-separated list, without operators (for example, creationDate,expirationDate,owner). The ID is always included in the response.

The fields string must be URL-encoded.

config.fromstring

Filters tokens based on the last usage time. The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of API tokens in a single response payload.

The maximal allowed page size is 10000 and the minimal allowed page size is 100.

If not set, 200 is used.

config.sortstring

The sort order of the token list.

You can sort by the following properties with a sign prefix for the sort order:

  • name: token name (+ a...z or - z...a)
  • lastUsedDate last used (+ never used tokens first - most recently used tokens first)
  • creationDate (+ oldest tokens first - newest tokens first)
  • expirationDate (+ tokens that expire soon first - unlimited tokens first)
  • modifiedDate last modified (+ never modified tokens first - most recently modified tokens first)

If no prefix is set, + is used.

If not set, tokens are sorted by creation date with newest first.



Default: -creationDate
config.tostring

Filters tokens based on the last usage time. The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
ApiTokenList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensApiTokensClient.listApiTokens();

lookupApiToken​

⚠️ Deprecated

accessTokensApiTokensClient.lookupApiToken(config): Promise<ApiToken>

Gets API token metadata by token secret

One of the following scopes is required:

  • environment-api:api-tokens:read
  • api-tokens:tokens:read

One of the following permissions is required:

  • environment:roles:viewer
  • api-tokens:tokens:read

Parameters​

NameType
config.body*requiredApiTokenSecret

Returns​

Return typeStatus codeDescription
ApiToken200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensApiTokensClient.lookupApiToken({
    body: {
      token:
        "dt0c01.ST2EY72KQINMH574WMNVI7YN.G3DFPBEJYMODIDAEX454M7YWBUVEFOWKPRVMWFASS64NFH52PX6BNDVFFM572RZM",
    },
  });

updateApiToken​

⚠️ Deprecated

accessTokensApiTokensClient.updateApiToken(config): Promise<void>

Updates an API token

One of the following scopes is required:

  • environment-api:api-tokens:write
  • api-tokens:tokens:write

One of the following permissions is required:

  • environment:roles:viewer
  • api-tokens:tokens:write

Parameters​

NameTypeDescription
config.body*requiredApiTokenUpdate
config.id*requiredstring

The ID of the token to be updated.

You can't disable the token you're using for authentication of the request.

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensApiTokensClient.updateApiToken({
    id: "...",
    body: {},
  });

accessTokensTenantTokensClient​

import { accessTokensTenantTokensClient } from '@dynatrace-sdk/client-classic-environment-v2';

cancelRotation​

accessTokensTenantTokensClient.cancelRotation(config): Promise<TenantTokenConfig>

Cancels tenant token rotation

One of the following scopes is required:

  • environment-api:tenant-token-rotation:write
  • fleet-management:tenant-token:rotate

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:tenant-token:rotate

To learn how to rotate tokens, see Token rotation in Dynatrace Documentation.

Returns​

Return typeStatus codeDescription
TenantTokenConfig200Success. Rotation process has been cancelled. The current tenant token remains valid.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. There is no ongoing rotation process. | Client side error. | Server side error.

Code example

import { accessTokensTenantTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensTenantTokensClient.cancelRotation();

finishRotation​

accessTokensTenantTokensClient.finishRotation(config): Promise<TenantTokenConfig>

Finishes tenant token rotation

One of the following scopes is required:

  • environment-api:tenant-token-rotation:write
  • fleet-management:tenant-token:rotate

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:tenant-token:rotate

To learn how to rotate tokens, see Token rotation in Dynatrace Documentation.

Returns​

Return typeStatus codeDescription
TenantTokenConfig200Success. The rotation process is completed. The active field of the response contains the new tenant token.

Throws​

Error TypeError Message
ErrorEnvelopeErrorNo ongoing rotation process. | Client side error. | Server side error.

Code example

import { accessTokensTenantTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensTenantTokensClient.finishRotation();

getRotationStatus​

accessTokensTenantTokensClient.getRotationStatus(config): Promise<TenantTokenRotationStatus>

Gets tenant token rotation status

One of the following scopes is required:

  • environment-api:tenant-token-rotation:write
  • fleet-management:tenant-token:rotate

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:tenant-token:rotate

To learn how to rotate tokens, see Token rotation in Dynatrace Documentation.

Returns​

Return typeStatus codeDescription
TenantTokenRotationStatus200Success. Returns rotation status.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Tenant token configuration is unavailable. | Client side error. | Server side error.

Code example

import { accessTokensTenantTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensTenantTokensClient.getRotationStatus();

startRotation​

accessTokensTenantTokensClient.startRotation(config): Promise<TenantTokenConfig>

Starts tenant token rotation

One of the following scopes is required:

  • environment-api:tenant-token-rotation:write
  • fleet-management:tenant-token:rotate

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:tenant-token:rotate

To learn how to rotate tokens, see Token rotation in Dynatrace Documentation.

Returns​

Return typeStatus codeDescription
TenantTokenConfig200Success. The new tenant token is created and will replace the old one. The active field of the response contains the new tenant token.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Another rotation process is already in progress. | Client side error. | Server side error.

Code example

import { accessTokensTenantTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await accessTokensTenantTokensClient.startRotation();

activeGatesActiveGateGroupsClient​

import { activeGatesActiveGateGroupsClient } from '@dynatrace-sdk/client-classic-environment-v2';

getActiveGateGroups​

⚠️ Deprecated

activeGatesActiveGateGroupsClient.getActiveGateGroups(config): Promise<ActiveGateGroups>

Lists ActiveGate groups

One of the following scopes is required:

  • environment-api:activegates:read
  • fleet-management:activegates:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:read

Deprecated since version 1.343. Use DQL Smartscape nodes to query ActiveGate data instead. See https://dt-url.net/mf03894

Returns​

Return typeStatus codeDescription
ActiveGateGroups200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { activeGatesActiveGateGroupsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesActiveGateGroupsClient.getActiveGateGroups();

activeGatesActiveGateTokensEnforcementClient​

import { activeGatesActiveGateTokensEnforcementClient } from '@dynatrace-sdk/client-classic-environment-v2';

getTokenEnforcement​

activeGatesActiveGateTokensEnforcementClient.getTokenEnforcement(config): Promise<ActiveGateTokenEnforcement>

Gets the status of ActiveGate tokens enforcement

Required scope: fleet-management:activegates:read One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:read

Returns​

Return typeStatus codeDescription
ActiveGateTokenEnforcement200Success. The response contains the status of ActiveGate tokens enforcement

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { activeGatesActiveGateTokensEnforcementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesActiveGateTokensEnforcementClient.getTokenEnforcement();

activeGatesAutoUpdateConfigurationClient​

import { activeGatesAutoUpdateConfigurationClient } from '@dynatrace-sdk/client-classic-environment-v2';

getAutoUpdateConfigById​

⚠️ Deprecated

activeGatesAutoUpdateConfigurationClient.getAutoUpdateConfigById(config): Promise<ActiveGateAutoUpdateConfig>

Gets the configuration of auto-update for the specified ActiveGate

One of the following scopes is required:

  • environment-api:activegates:read
  • fleet-management:activegates:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:read

Gets the configuration of auto-update for the specified ActiveGate

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint GET /api/v2/settings/objects with schemaId builtin:deployment.activegate.updates and scopes=ENVIRONMENT_ACTIVE_GATE-{ActiveGate ID} to retrieve the auto-update setting of a specific ActiveGate.

Parameters​

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.

Returns​

Return typeStatus codeDescription
ActiveGateAutoUpdateConfig200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorNot found. See response body for details. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateConfigurationClient.getAutoUpdateConfigById(
    { agId: "..." },
  );

getGlobalAutoUpdateConfigForTenant​

⚠️ Deprecated

activeGatesAutoUpdateConfigurationClient.getGlobalAutoUpdateConfigForTenant(config): Promise<ActiveGateGlobalAutoUpdateConfig>

Gets the global auto-update configuration of environment ActiveGates.

One of the following scopes is required:

  • environment-api:activegates:read
  • fleet-management:activegates:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:read

Gets the global auto-update configuration of environment ActiveGates.

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint GET /api/v2/settings/objects with schemaId builtin:deployment.activegate.updates and scopes=tenant to retrieve the global auto-update setting of environment ActiveGates.

Returns​

Return typeStatus codeDescription
ActiveGateGlobalAutoUpdateConfig200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateConfigurationClient.getGlobalAutoUpdateConfigForTenant();

putAutoUpdateConfigById​

⚠️ Deprecated

activeGatesAutoUpdateConfigurationClient.putAutoUpdateConfigById(config): Promise<void>

Updates the configuration of auto-update for the specified ActiveGate

One of the following scopes is required:

  • environment-api:activegates:write
  • fleet-management:activegates:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:write

Updates the configuration of auto-update for the specified ActiveGate

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint POST /api/v2/settings/objects with schemaId builtin:deployment.activegate.updates and scope=ENVIRONMENT_ACTIVE_GATE-{ActiveGate ID} to change the auto-update setting of a specific ActiveGate.

Parameters​

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.body*requiredActiveGateAutoUpdateConfig

Returns​

Return typeStatus codeDescription
void204Success. The auto-update configuration have been updated. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateConfigurationClient.putAutoUpdateConfigById(
    {
      agId: "...",
      body: {
        setting: "INHERITED",
        updateWindows: {
          windows: [
            {
              id: "vu9U3hXa3q0AAAABADdkeW5hdHJhY2Uuc2V0dGluZ3MuZGVwbG95bWVudC5tYW5h",
            },
          ],
        },
      },
    },
  );

putGlobalAutoUpdateConfigForTenant​

⚠️ Deprecated

activeGatesAutoUpdateConfigurationClient.putGlobalAutoUpdateConfigForTenant(config): Promise<void>

Puts the global auto-update configuration of environment ActiveGates.

One of the following scopes is required:

  • environment-api:activegates:write
  • fleet-management:activegates:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:write

Puts the global auto-update configuration of environment ActiveGates.

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint POST /api/v2/settings/objects with schemaId builtin:deployment.activegate.updates and scope=tenant to change the global auto-update setting of environment ActiveGates.

Parameters​

NameType
config.body*requiredActiveGateGlobalAutoUpdateConfig

Returns​

Return typeStatus codeDescription
void204Success. The global auto-update configuration have been updated. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateConfigurationClient.putGlobalAutoUpdateConfigForTenant(
    {
      body: {
        globalSetting: "ENABLED",
        updateWindows: {
          windows: [
            {
              id: "vu9U3hXa3q0AAAABADdkeW5hdHJhY2Uuc2V0dGluZ3MuZGVwbG95bWVudC5tYW5h",
            },
          ],
        },
      },
    },
  );

validateAutoUpdateConfigById​

⚠️ Deprecated

activeGatesAutoUpdateConfigurationClient.validateAutoUpdateConfigById(config): Promise<void>

Validates the payload for the POST /activeGates/{agId}/autoUpdate request.

One of the following scopes is required:

  • environment-api:activegates:write
  • fleet-management:activegates:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:write

Validates the payload for the POST /activeGates/{agId}/autoUpdate request.

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint POST /api/v2/settings/objects?validateOnly=true with schemaId builtin:deployment.activegate.updates and scope=ENVIRONMENT_ACTIVE_GATE-{ActiveGate ID} to validate the auto-update setting of a specific ActiveGate.

Parameters​

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.body*requiredActiveGateAutoUpdateConfig

Returns​

Return typeStatus codeDescription
void204Validated. The submitted auto-update configuration is valid. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateConfigurationClient.validateAutoUpdateConfigById(
    {
      agId: "...",
      body: {
        setting: "INHERITED",
        updateWindows: {
          windows: [
            {
              id: "vu9U3hXa3q0AAAABADdkeW5hdHJhY2Uuc2V0dGluZ3MuZGVwbG95bWVudC5tYW5h",
            },
          ],
        },
      },
    },
  );

validateGlobalAutoUpdateConfigForTenant​

⚠️ Deprecated

activeGatesAutoUpdateConfigurationClient.validateGlobalAutoUpdateConfigForTenant(config): Promise<void>

Validates the payload for the POST /activeGates/autoUpdate request.

One of the following scopes is required:

  • environment-api:activegates:write
  • fleet-management:activegates:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:write

Validates the payload for the POST /activeGates/autoUpdate request.

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint POST /api/v2/settings/objects?validateOnly=true with schemaId builtin:deployment.activegate.updates and scope=tenant to validate the global auto-update setting of environment ActiveGates.

Parameters​

NameType
config.body*requiredActiveGateGlobalAutoUpdateConfig

Returns​

Return typeStatus codeDescription
void204Validated. The submitted configuration is valid. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateConfigurationClient.validateGlobalAutoUpdateConfigForTenant(
    {
      body: {
        globalSetting: "ENABLED",
        updateWindows: {
          windows: [
            {
              id: "vu9U3hXa3q0AAAABADdkeW5hdHJhY2Uuc2V0dGluZ3MuZGVwbG95bWVudC5tYW5h",
            },
          ],
        },
      },
    },
  );

activeGatesAutoUpdateJobsClient​

import { activeGatesAutoUpdateJobsClient } from '@dynatrace-sdk/client-classic-environment-v2';

createUpdateJobForAg​

activeGatesAutoUpdateJobsClient.createUpdateJobForAg(config): Promise<UpdateJob>

Creates a new update job for the specified ActiveGate

One of the following scopes is required:

  • environment-api:activegates:write
  • fleet-management:activegates:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:write

Parameters​

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.body*requiredUpdateJob

Returns​

Return typeStatus codeDescription
UpdateJob201Success. The update-job have been created.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateJobsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateJobsClient.createUpdateJobForAg(
    {
      agId: "...",
      body: { targetVersion: "1.190.0.20200301-130000" },
    },
  );

deleteUpdateJobByJobIdForAg​

activeGatesAutoUpdateJobsClient.deleteUpdateJobByJobIdForAg(config): Promise<void>

Deletes the specified update job

One of the following scopes is required:

  • environment-api:activegates:write
  • fleet-management:activegates:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:write

Parameters​

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.jobId*requiredstringA unique identifier for a update-job of ActiveGate.

Returns​

Return typeStatus codeDescription
void204Success. The update-job have been deleted. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Not found. See response body for details. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateJobsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateJobsClient.deleteUpdateJobByJobIdForAg(
    { agId: "...", jobId: "..." },
  );

getAllUpdateJobList​

activeGatesAutoUpdateJobsClient.getAllUpdateJobList(config): Promise<UpdateJobsAll>

List ActiveGates with update jobs

One of the following scopes is required:

  • environment-api:activegates:read
  • fleet-management:activegates:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:read

The response includes ActiveGates that have both completed (successful and failed) jobs and jobs in progress.

Parameters​

NameTypeDescription
config.fromstring

The start of the requested timeframe for update jobs.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of one day is used (now-1d).

Maximum timeframe is 31 days.

config.lastUpdatesbooleanIf true, filters the resulting set of update jobs to the most recent update of each type.

Default: false
config.startVersionstringFilters the resulting set of update-jobs by the initial version (required format <major>.<minor>.<revision>).
config.startVersionCompareType"EQUAL" | "GREATER" | "GREATER_EQUAL" | "LOWER" | "LOWER_EQUAL"

Filters the resulting set of update jobs by the specified initial version.

Specify the comparison operator here.

config.targetVersionstringFilters the resulting set of update-jobs by the target version (required format <major>.<minor>.<revision>).
config.targetVersionCompareType"EQUAL" | "GREATER" | "GREATER_EQUAL" | "LOWER" | "LOWER_EQUAL"

Filters the resulting set of update jobs by the specified target version.

Specify the comparison operator here.

config.tostring

The end of the requested timeframe for update jobs.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

config.updateType"SYNTHETIC" | "ACTIVE_GATE" | "REMOTE_PLUGIN_AGENT" | "Z_REMOTE"Filters the resulting set of update-jobs by the update type.

Example: ACTIVE_GATE

Returns​

Return typeStatus codeDescription
UpdateJobsAll200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateJobsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateJobsClient.getAllUpdateJobList();

getUpdateJobByJobIdForAg​

activeGatesAutoUpdateJobsClient.getUpdateJobByJobIdForAg(config): Promise<UpdateJob>

Gets the parameters of the specified update job

One of the following scopes is required:

  • environment-api:activegates:read
  • fleet-management:activegates:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:read

Parameters​

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.jobId*requiredstringA unique identifier for a update-job of ActiveGate.

Returns​

Return typeStatus codeDescription
UpdateJob200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorNot found. See response body for details. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateJobsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateJobsClient.getUpdateJobByJobIdForAg(
    { agId: "...", jobId: "..." },
  );

getUpdateJobListByAgId​

activeGatesAutoUpdateJobsClient.getUpdateJobListByAgId(config): Promise<UpdateJobList>

Lists update jobs for the specified ActiveGate

One of the following scopes is required:

  • environment-api:activegates:read
  • fleet-management:activegates:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:read

The job can update the ActiveGate to the specified version or the latest available one.

Parameters​

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.fromstring

The start of the requested timeframe for update jobs.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of one week is used (now-1w).

Maximum timeframe is 31 days.

config.lastUpdatesbooleanIf true, filters the resulting set of update jobs to the most recent update of each type.

Default: false
config.startVersionstringFilters the resulting set of update-jobs by the initial version (required format <major>.<minor>.<revision>).
config.startVersionCompareType"EQUAL" | "GREATER" | "GREATER_EQUAL" | "LOWER" | "LOWER_EQUAL"

Filters the resulting set of update jobs by the specified initial version.

Specify the comparison operator here.

config.targetVersionstringFilters the resulting set of update-jobs by the target version (required format <major>.<minor>.<revision>).
config.targetVersionCompareType"EQUAL" | "GREATER" | "GREATER_EQUAL" | "LOWER" | "LOWER_EQUAL"

Filters the resulting set of update jobs by the specified target version.

Specify the comparison operator here.

config.tostring

The end of the requested timeframe for update jobs.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

config.updateType"SYNTHETIC" | "ACTIVE_GATE" | "REMOTE_PLUGIN_AGENT" | "Z_REMOTE"Filters the resulting set of update-jobs by the update type.

Example: ACTIVE_GATE

Returns​

Return typeStatus codeDescription
UpdateJobList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorNot found. See response body for details. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateJobsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateJobsClient.getUpdateJobListByAgId(
    { agId: "..." },
  );

validateUpdateJobForAg​

activeGatesAutoUpdateJobsClient.validateUpdateJobForAg(config): Promise<void>

Validates the payload for the POST /activeGates/{agId}/updateJobs request.

One of the following scopes is required:

  • environment-api:activegates:write
  • fleet-management:activegates:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:write

Parameters​

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.body*requiredUpdateJob

Returns​

Return typeStatus codeDescription
void204Validated. The submitted update-job is valid. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { activeGatesAutoUpdateJobsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateJobsClient.validateUpdateJobForAg(
    {
      agId: "...",
      body: { targetVersion: "1.190.0.20200301-130000" },
    },
  );

activeGatesClient​

import { activeGatesClient } from '@dynatrace-sdk/client-classic-environment-v2';

getAllActiveGates​

⚠️ Deprecated

activeGatesClient.getAllActiveGates(config): Promise<ActiveGateList>

Lists all available ActiveGates

One of the following scopes is required:

  • environment-api:activegates:read
  • fleet-management:activegates:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:read

The response includes all ActiveGates that are currently connected to the environment or have been connected during last 2 hours. Deprecated since version 1.343. Use DQL Smartscape nodes to query ActiveGate data instead. See https://dt-url.net/mf03894

Parameters​

NameTypeDescription
config.autoUpdate"ENABLED" | "DISABLED"Filters the resulting set of ActiveGates by the actual state of auto-update.
config.containerizedbooleanFilters the resulting set of ActiveGates to those which are running in container (true) or not (false).
config.disabledModuleArray<"SYNTHETIC" | "AWS" | "AZURE" | "BEACON_FORWARDER" | "CLOUD_FOUNDRY" | "DB_INSIGHT" | "DEBUGGING" | "EXTENSIONS_V1" | "EXTENSIONS_V2" | "KUBERNETES" | "LOGS" | "MEMORY_DUMPS" | "METRIC_API" | "ONE_AGENT_ROUTING" | "OTLP_INGEST" | "REST_API" | "VMWARE" | "Z_OS">Filters the resulting set of ActiveGates by the disabled modules.
config.enabledModuleArray<"SYNTHETIC" | "AWS" | "AZURE" | "BEACON_FORWARDER" | "CLOUD_FOUNDRY" | "DB_INSIGHT" | "DEBUGGING" | "EXTENSIONS_V1" | "EXTENSIONS_V2" | "KUBERNETES" | "LOGS" | "MEMORY_DUMPS" | "METRIC_API" | "ONE_AGENT_ROUTING" | "OTLP_INGEST" | "REST_API" | "VMWARE" | "Z_OS">Filters the resulting set of ActiveGates by the enabled modules.
config.fipsModebooleanFilters the resulting set of ActiveGates to those which are running in FIPS mode (true) or not (false).
config.groupstring

Filters the resulting set of ActiveGates by the group.

You can specify a partial name. In that case, the CONTAINS operator is used.

config.hostnamestring

Filters the resulting set of ActiveGates by the name of the host it's running on.

You can specify a partial name. In that case, the CONTAINS operator is used.

config.loadBalancerAddressstring

Filters the resulting set of ActiveGates by the Load Balancer address.

You can specify a partial address. In that case, the CONTAINS operator is used.

config.networkAddressstring

Filters the resulting set of ActiveGates by the network address.

You can specify a partial address. In that case, the CONTAINS operator is used.

config.networkZonestring

Filters the resulting set of ActiveGates by the network zone.

You can specify a partial name. In that case, the CONTAINS operator is used.

config.onlinebooleanFilters the resulting set of ActiveGates by the communication status.
config.osArchitecture"S390" | "X86" | "ARM" | "PPCLE"Filters the resulting set of ActiveGates by the OS architecture of the host it's running on.
config.osType"LINUX" | "WINDOWS"Filters the resulting set of ActiveGates by the OS type of the host it's running on.
config.tokenExpirationSetbooleanFilters the resulting set of ActiveGates to those with set expiration date for authorization token.
config.tokenState"UNKNOWN" | "ABSENT" | "EXPIRING" | "INVALID" | "UNSUPPORTED" | "VALID"Filters the resulting set of ActiveGates to those with authorization token in specified state.
config.type"ENVIRONMENT" | "ENVIRONMENT_MULTI"Filters the resulting set of ActiveGates by the ActiveGate type.
config.updateStatus"UNKNOWN" | "INCOMPATIBLE" | "OUTDATED" | "SCHEDULED" | "SUPPRESSED" | "UP2DATE" | "UPDATE_IN_PROGRESS" | "UPDATE_PENDING" | "UPDATE_PROBLEM"Filters the resulting set of ActiveGates by the auto-update status.
config.versionstring

Filters the resulting set of ActiveGates by the specified version.

Specify the version in <major>.<minor>.<revision> format (for example, 1.195.0) here.

config.versionCompareType"EQUAL" | "GREATER" | "GREATER_EQUAL" | "LOWER" | "LOWER_EQUAL"

Filters the resulting set of ActiveGates by the specified version.

Specify the comparison operator here.

Returns​

Return typeStatus codeDescription
ActiveGateList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { activeGatesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await activeGatesClient.getAllActiveGates();

getOneActiveGateById​

⚠️ Deprecated

activeGatesClient.getOneActiveGateById(config): Promise<ActiveGate>

Gets the details of the specified ActiveGate

One of the following scopes is required:

  • environment-api:activegates:read
  • fleet-management:activegates:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:activegates:read

Deprecated since version 1.343. Use DQL Smartscape nodes to query ActiveGate data instead. See https://dt-url.net/mf03894

Parameters​

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.

Returns​

Return typeStatus codeDescription
ActiveGate200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorNot found. See response body for details. | Client side error. | Server side error.

Code example

import { activeGatesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await activeGatesClient.getOneActiveGateById({
  agId: "...",
});

activeGatesRemoteConfigurationManagementClient​

import { activeGatesRemoteConfigurationManagementClient } from '@dynatrace-sdk/client-classic-environment-v2';

createRemoteIdentityOperationJob​

activeGatesRemoteConfigurationManagementClient.createRemoteIdentityOperationJob(config): Promise<RemoteConfigurationManagementJob>

Creates a new remote configuration management job

Required scope: fleet-management:activegates:write One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:activegates:write

Parameters​

Returns​

Return typeStatus codeDescription
RemoteConfigurationManagementJob201Created

Throws​

Error TypeError Message
RemoteConfigurationManagementValidationResultErrorFailed. The input is invalid.
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { activeGatesRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesRemoteConfigurationManagementClient.createRemoteIdentityOperationJob(
    {
      body: {
        entities: ["0x2b7c0b02,0x4928065d"],
        operations: [
          { attribute: "networkZone", operation: "set" },
        ],
      },
    },
  );

createRemoteIdentityOperationPreview​

activeGatesRemoteConfigurationManagementClient.createRemoteIdentityOperationPreview(config): Promise<RemoteConfigurationManagementPreviewList>

Creates a preview for remote configuration management job - applicable only to network zone and ActiveGate group

Required scope: fleet-management:activegates:write One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:activegates:write

Parameters​

Returns​

Return typeStatus codeDescription
RemoteConfigurationManagementPreviewList200Success

Throws​

Error TypeError Message
RemoteConfigurationManagementValidationResultErrorFailed. The input is invalid.
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { activeGatesRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesRemoteConfigurationManagementClient.createRemoteIdentityOperationPreview(
    {
      body: {
        entities: ["0x2b7c0b02,0x4928065d"],
        operations: [
          { attribute: "networkZone", operation: "set" },
        ],
      },
    },
  );

getCurrentRemoteIdentityOperationJob​

activeGatesRemoteConfigurationManagementClient.getCurrentRemoteIdentityOperationJob(config): Promise<void | RemoteConfigurationManagementJob>

Gets remote configuration management job that is currently running

Required scope: fleet-management:activegates:read One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:activegates:read

The currently running remote configuration management job may be related to ActiveGates or OneAgents. There is a limit of one concurrent remote configuration management job, regardless of the entity type.

Returns​

Return typeStatus codeDescription
RemoteConfigurationManagementJob200Success
void204No remote configuration management job is currently running

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { activeGatesRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesRemoteConfigurationManagementClient.getCurrentRemoteIdentityOperationJob();

getRemoteIdentityOperationJob​

activeGatesRemoteConfigurationManagementClient.getRemoteIdentityOperationJob(config): Promise<RemoteConfigurationManagementJob>

Gets the specified remote configuration management job

Required scope: fleet-management:activegates:read One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:activegates:read

Parameters​

NameTypeDescription
config.id*requiredstringThe ID of the required remote configuration management job.

Returns​

Return typeStatus codeDescription
RemoteConfigurationManagementJob200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { activeGatesRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesRemoteConfigurationManagementClient.getRemoteIdentityOperationJob(
    { id: "..." },
  );

getRemoteIdentityOperations​

activeGatesRemoteConfigurationManagementClient.getRemoteIdentityOperations(config): Promise<RemoteConfigurationManagementJobList>

Lists finished ActiveGate remote configuration management jobs

Required scope: fleet-management:activegates:read One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:activegates:read

The response includes finished jobs for the last 7 days.

Parameters​

NameTypeDescription
config.fromstring

The start of the requested timeframe for a remote configuration management job.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years
config.tostring

The end of the requested timeframe for a remote configuration management job.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
RemoteConfigurationManagementJobList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { activeGatesRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesRemoteConfigurationManagementClient.getRemoteIdentityOperations();

validateRemoteIdentityOperation​

activeGatesRemoteConfigurationManagementClient.validateRemoteIdentityOperation(config): Promise<void>

Validates the payload for the POST /activeGates/remoteConfigurationManagement request.

Required scope: fleet-management:activegates:write One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:activegates:write

Parameters​

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
RemoteConfigurationManagementValidationResultErrorFailed. The input is invalid.
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { activeGatesRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesRemoteConfigurationManagementClient.validateRemoteIdentityOperation(
    {
      body: {
        entities: ["0x2b7c0b02,0x4928065d"],
        operations: [
          { attribute: "networkZone", operation: "set" },
        ],
      },
    },
  );

adaptiveTrafficManagementClient​

import { adaptiveTrafficManagementClient } from '@dynatrace-sdk/client-classic-environment-v2';

getRootSpansPerMinute​

adaptiveTrafficManagementClient.getRootSpansPerMinute(config): Promise<AdaptiveTrafficManagementDto>

Gets sampling configuration.

Required scope: adaptive-traffic-management:sampling-configuration:read

Returns​

Return typeStatus codeDescription
AdaptiveTrafficManagementDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { adaptiveTrafficManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await adaptiveTrafficManagementClient.getRootSpansPerMinute();

attacksClient​

import { attacksClient } from '@dynatrace-sdk/client-classic-environment-v2';

getAttack​

attacksClient.getAttack(config): Promise<Attack>

Gets the specified attack

Required scope: environment-api:attacks:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

Parameters​

NameTypeDescription
config.fieldsstring

A list of additional attack properties you can add to the response.

The following properties are available (all other properties are always included and you can't remove them from the response):

  • attackTarget: The targeted host/database of an attack.
  • request: The request that was sent from the attacker.
  • entrypoint: The entry point used by an attacker to start a specific attack.
  • vulnerability: The vulnerability utilized by the attack.
  • securityProblem: The related security problem.
  • attacker: The attacker of an attack.
  • managementZones: The related management zones.

To add properties, specify them in a comma-separated list and prefix each property with a plus (for example, +attackTarget,+securityProblem).

config.id*requiredstringThe ID of the attack.

Returns​

Return typeStatus codeDescription
Attack200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { attacksClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await attacksClient.getAttack({ id: "..." });

getAttacks​

attacksClient.getAttacks(config): Promise<AttackList>

Lists all attacks

Required scope: environment-api:attacks:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

Parameters​

NameTypeDescription
config.attackSelectorstring

Defines the scope of the query. Only attacks matching the specified criteria are included in the response. You can add one or more of the following criteria. Values are not case-sensitive and the EQUALS operator is used unless otherwise specified.

  • State: state("value"). The state of the attack. Possible values are EXPLOITED, BLOCKED, and ALLOWLISTED.
  • Attack Type: attackType("value"). The type of the attack. Find the possible values in the description of the attackType field of the response.
  • Country Code: countryCode("value"). The country code of the attacker. Supported values include all ISO-3166-1 alpha-2 country codes (2-letter). Supplying empty filter value countryCode() will return attacks, where location is not available.
  • Request path contains: requestPathContains("value"). Filters for a substring in the request path. The CONTAINS operator is used. A maximum of 48 characters are allowed.
  • Process group name contains: processGroupNameContains("value"). Filters for a substring in the targeted process group's name. The CONTAINS operator is used.
  • Vulnerability ID: vulnerabilityId("123456789"). The exact ID of the vulnerability.
  • Source IPs: sourceIps("93.184.216.34", "63.124.6.12"). The exact IPv4/IPv6 addresses of the attacker.
  • Management zone ID: managementZoneIds("mzId-1", "mzId-2").
  • Management zone name: managementZones("name-1", "name-2"). Values are case sensitive.
  • Technology: technology("technology-1", "technology-2"). Find the possible values in the description of the technology field of the response. The EQUALS operator is used.

To set several criteria, separate them with a comma (,). Only results matching (all criteria are included in the response.

Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (~) inside quotes:

  • Tilde ~
  • Quote "
config.fieldsstring

A list of additional attack properties you can add to the response.

The following properties are available (all other properties are always included and you can't remove them from the response):

  • attackTarget: The targeted host/database of an attack.
  • request: The request that was sent from the attacker.
  • entrypoint: The entry point used by an attacker to start a specific attack.
  • vulnerability: The vulnerability utilized by the attack.
  • securityProblem: The related security problem.
  • attacker: The attacker of an attack.
  • managementZones: The related management zones.
  • affectedEntities: The affected entities of an attack.

To add properties, specify them in a comma-separated list and prefix each property with a plus (for example, +attackTarget,+securityProblem).

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of thirty days is used (now-30d).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of attacks in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

config.sortstring

Specifies one or more fields for sorting the attack list. Multiple fields can be concatenated using a comma (,) as a separator (e.g. +state,-timestamp).

You can sort by the following properties with a sign prefix for the sorting order.

  • displayId: The attack's display ID.
  • displayName: The attack's display name.
  • attackType: The type of the attack (e.g. SQL_INJECTION, JNDI_INJECTION, etc.).
  • state: The state of the attack. (+ low severity state first - high severity state first)
  • sourceIp: The IP address of the attacker. Sorts by the numerical IP value.
  • requestPath: The request path where the attack was started.
  • timestamp: When the attack was executed. (+ old attacks first or - new attacks first) If no prefix is set, + is used.
config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
AttackList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { attacksClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await attacksClient.getAttacks();

auditLogsClient​

import { auditLogsClient } from '@dynatrace-sdk/client-classic-environment-v2';

getLog​

auditLogsClient.getLog(config): Promise<AuditLogEntry>

Gets the specified entry of the audit log | maturity=EARLY_ADOPTER

Required scope: environment-api:audit-logs:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.id*requiredstringThe ID of the required log entry.

Returns​

Return typeStatus codeDescription
AuditLogEntry200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Invalid ID format. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { auditLogsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await auditLogsClient.getLog({ id: "..." });

getLogs​

auditLogsClient.getLogs(config): Promise<AuditLog>

Gets the audit log of your Dynatrace environment | maturity=EARLY_ADOPTER

Required scope: environment-api:audit-logs:read Required permission: environment:roles:manage-settings

You can limit the output by using pagination:

  1. Specify the number of results per page in the pageSize query parameter.
  2. Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.

Parameters​

NameTypeDescription
config.filterstring

Filters the audit log. You can use the following criteria:

  • User: user("userIdentification"). The EQUALS operator applies.
  • Event type: eventType("value"). The EQUALS operator applies.
  • Category of a logged operation: category("value"). The EQUALS operator applies.
  • Entity ID: entityId("id"). The CONTAINS operator applies.
  • Settings schema ID: dt.settings.schema_id("id"). The EQUALS operator applies.
  • Settings scope ID: dt.settings.scope_id("id"). The EQUALS operator applies.
  • Settings key: dt.settings.key("key"). The EQUALS operator applies.
  • Settings object ID: dt.settings.object_id("id"). The EQUALS operator applies.

For each criterion, you can specify multiple alternatives with comma-separated values. In this case, the OR logic applies. For example, eventType("CREATE","UPDATE") means eventType can be "CREATE" or "UPDATE".

You can specify multiple comma-separated criteria, such as eventType("CREATE","UPDATE"),category("CONFIG"). Only results matching all criteria are included in response.

Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (~) inside quotes:

  • Tilde ~
  • Quote "
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of log entries in a single response payload.

The maximal allowed page size is 5000.

If not set, 1000 is used.

config.sortstring

The sorting of audit log entries:

  • timestamp: Oldest first.
  • -timestamp: Newest first.

If not set, the newest first sorting is applied.



Default: -timestamp
config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
AuditLog200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { auditLogsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await auditLogsClient.getLogs();

businessEventsClient​

import { businessEventsClient } from '@dynatrace-sdk/client-classic-environment-v2';

ingest​

businessEventsClient.ingest(config): Promise<void>

Ingests a business event

One of the following scopes is required:

  • storage:events:write
  • openpipeline:bizevents:ingest

The maximum payload size of a single request is 5 MiB. Requests with a greater payload are rejected, and the API returns a 413 response code.

The ingestion of business events is subject to licensing (see licensing documentation).

Parameters​

NameType
config.body*requiredCloudEvent | Array<CloudEvent> | IngestBody
config.type*required"application/cloudevent+json" | "application/cloudevents+json" | "application/cloudevent-batch+json" | "application/cloudevents-batch+json" | "application/json; charset=utf-8"

Returns​

Return typeStatus codeDescription
void202The provided business events are all accepted and will be processed.

Throws​

Error TypeError Message
BizEventIngestResultErrorSome business events are invalid. Valid business events are accepted and will be processed. | Content too large | Too many requests | Service is temporarily unavailable
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { businessEventsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await businessEventsClient.ingest({
  type: "application/cloudevent+json",
  body: {
    specversion: "1.0",
    id: "1",
    source: "custom.source",
    type: "com.mycompany.shop.checkout",
    dtcontext:
      'dt.session_id="234234234324235345345",dt.entity.rum_application="APPLICATION-53453458340758",host.name="123.123.123.123"',
    dataschema:
      "http://dynatrace.com/schema/bizevents/generic/1.0",
    traceparent:
      "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00",
    data: {
      id: "OR-838475",
      paymentType: "paypal",
      plannedDeliveryDate: "01.01.2021",
      total: 234,
    },
  },
});

credentialVaultClient​

import { credentialVaultClient } from '@dynatrace-sdk/client-classic-environment-v2';

createCredentials​

credentialVaultClient.createCredentials(config): Promise<CredentialsId>

Creates a new credentials set.

Required scope: environment-api:credentials:write Required permission: environment:roles:viewer

The body must not provide an ID. An ID is assigned automatically by the Dynatrace server.

Parameters​

NameType
config.body*requiredCredentials

Returns​

Return typeStatus codeDescription
CredentialsId201Success. The new credentials set has been created. The response contains the ID of the set.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await credentialVaultClient.createCredentials({
  body: {
    name: "...",
    scopes: ["APP_ENGINE"],
    type: "AWS_MONITORING_KEY_BASED",
  },
});

getCredentials​

credentialVaultClient.getCredentials(config): Promise<CredentialsResponseElement>

Gets the metadata of the specified credentials set.

Required scope: environment-api:credentials:read Required permission: environment:roles:viewer

The credentials set itself (e.g. username/certificate and password) is not included in the response.

Parameters​

NameTypeDescription
config.id*requiredstringThe Dynatrace entity ID of the required credentials set.

Returns​

Return typeStatus codeDescription
CredentialsResponseElement200Success. The response contains the metadata of the credentials set.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await credentialVaultClient.getCredentials({
  id: "...",
});

getCredentialsDetails​

credentialVaultClient.getCredentialsDetails(config): Promise<AbstractCredentialsResponseElement>

Gets the details of the specified credentials set.

Required scope: environment-api:credentials:read Required permission: environment:roles:viewer

The credentials set including username/certificate, password or token is included in the response.

Parameters​

NameTypeDescription
config.id*requiredstringThe Dynatrace entity ID of the required credentials set.

Returns​

Return typeStatus codeDescription
AbstractCredentialsResponseElement200Success. The response contains the details of the credentials set.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. E.g. Requested credentials with unsupported scope. Only APP_ENGINE scope is supported. | Failed. Requested credentials belong to another user.

Code example

import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await credentialVaultClient.getCredentialsDetails({
    id: "...",
  });

getCredentialsDetailsList​

credentialVaultClient.getCredentialsDetailsList(config): Promise<CredentialsDetailsList>

Gets the details of the specified credentials sets.

The credentials set including username/certificate, password or token is included in the response.

Parameters​

NameTypeDescription
config.idsstringThe list of Dynatrace entity IDs of the required credentials sets (separated by commas).

Returns​

Return typeStatus codeDescription
CredentialsDetailsList200Success. The response contains the details of the credentials sets.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. E.g. Requested credentials with unsupported scope. Only SYNTHETIC and APP_ENGINE scope are supported. | Failed. Requested credentials belong to another user. | Client side error. | Server side error.

Code example

import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await credentialVaultClient.getCredentialsDetailsList();

listCredentials​

credentialVaultClient.listCredentials(config): Promise<CredentialsList>

Lists all sets of credentials in your environment.

Required scope: environment-api:credentials:read Required permission: environment:roles:viewer

The credentials set itself (username/certificate and password) is not included in the response.

Parameters​

NameTypeDescription
config.namestringFilters the result by the name. When in quotation marks, whole phrase is taken. Case insensitive.
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of credentials in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

config.scopestringFilters credentials with specified scope.
config.type"CERTIFICATE" | "TOKEN" | "USERNAME_PASSWORD" | "AWS_MONITORING_KEY_BASED" | "AWS_MONITORING_ROLE_BASED" | "SNMPV3"Filters the result by the specified credentials type.
config.userstringFilters credentials accessible to the user (owned by the user or the ones that are accessible for all).

Returns​

Return typeStatus codeDescription
CredentialsList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await credentialVaultClient.listCredentials();

removeCredentials​

credentialVaultClient.removeCredentials(config): Promise<void>

Deletes the specified credentials set

Required scope: environment-api:credentials:write Required permission: environment:roles:viewer

Provide credential ID in the path.

Parameters​

NameTypeDescription
config.id*requiredstringThe ID of the credentials set to be deleted.

Returns​

Return typeStatus codeDescription
void204Success. The credentials set has been deleted. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await credentialVaultClient.removeCredentials({
  id: "...",
});

updateCredentials​

credentialVaultClient.updateCredentials(config): Promise<void | CredentialsId>

Updates the specified credentials set.

Required scope: environment-api:credentials:write Required permission: environment:roles:viewer

The body must not provide an ID. The ID should be provided in the path.

Parameters​

NameTypeDescription
config.body*requiredCredentials
config.id*requiredstringThe Dynatrace entity ID of the credentials set to be updated.

Returns​

Return typeStatus codeDescription
CredentialsId201Success. The new credentials set has been created. The response contains the ID of the set.
void204Success. The credentials set has been updated. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await credentialVaultClient.updateCredentials({
  id: "...",
  body: {
    name: "...",
    scopes: ["APP_ENGINE"],
    type: "AWS_MONITORING_KEY_BASED",
  },
});

davisSecurityAdvisorClient​

import { davisSecurityAdvisorClient } from '@dynatrace-sdk/client-classic-environment-v2';

getAdviceForSecurityProblems​

davisSecurityAdvisorClient.getAdviceForSecurityProblems(config): Promise<DavisSecurityAdviceList>

Provides advice for security problems.

Required scope: environment-api:security-problems:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

You can narrow down the output by providing the management zone and pagination. If you specify a management zone, only problems originating from that zone are included to the request.

Parameters​

NameTypeDescription
config.managementZoneFilterstring

To specify management zones, use one of the options listed below. For each option you can specify multiple comma-separated values. If several values are specified, the OR logic applies. All values are case-sensitive and must be quoted.

  • Management zone ID: ids("mzId-1", "mzId-2").
  • Management zone names: names("mz-1", "mz-2").

You can specify several comma-separated criteria (for example, names("myMz"),ids("9130632296508575249")).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of security advices in a single response payload.

The maximal allowed page size is 500.

If not set, 5 is used.

Returns​

Return typeStatus codeDescription
DavisSecurityAdviceList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { davisSecurityAdvisorClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await davisSecurityAdvisorClient.getAdviceForSecurityProblems();

eventsClient​

import { eventsClient } from '@dynatrace-sdk/client-classic-environment-v2';

createEvent​

eventsClient.createEvent(config): Promise<EventIngestResults>

Ingests a custom event

One of the following scopes is required:

  • openpipeline:events.davis:ingest
  • storage:events:write
  • environment-api:events:write

One of the following permissions is required:

  • environment:roles:viewer
  • openpipeline:events.davis:ingest

The ingestion of custom events is subject to licensing (see licensing documentation).

Parameters​

NameType
config.body*requiredEventIngest

Returns​

Return typeStatus codeDescription
EventIngestResults201The event ingest request was received by the server. The response body indicates for each event whether its creation was successful.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await eventsClient.createEvent({
  body: { eventType: "AVAILABILITY_EVENT", title: "..." },
});

getEvent​

eventsClient.getEvent(config): Promise<Event>

Gets the properties of an event

Required scope: environment-api:events:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.eventId*requiredstringThe ID of the required event.

Returns​

Return typeStatus codeDescription
Event200Success. The response contains the configuration of the event.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await eventsClient.getEvent({
  eventId: "...",
});

getEventProperties​

eventsClient.getEventProperties(config): Promise<EventPropertiesList>

Lists all event properties

One of the following scopes is required:

  • storage:events:read
  • environment-api:events:read

One of the following permissions is required:

  • environment:roles:viewer
  • storage:events:read

Parameters​

NameTypeDescription
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of event properties in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

Returns​

Return typeStatus codeDescription
EventPropertiesList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await eventsClient.getEventProperties();

getEventProperty​

eventsClient.getEventProperty(config): Promise<EventPropertyDetails>

Gets the details of an event property

One of the following scopes is required:

  • storage:events:read
  • environment-api:events:read

One of the following permissions is required:

  • environment:roles:viewer
  • storage:events:read

Parameters​

NameTypeDescription
config.propertyKey*requiredstringThe event property key you're inquiring.

Returns​

Return typeStatus codeDescription
EventPropertyDetails200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await eventsClient.getEventProperty({
  propertyKey: "...",
});

getEventType​

eventsClient.getEventType(config): Promise<EventType>

Gets the properties of an event type

One of the following scopes is required:

  • storage:events:read
  • environment-api:events:read

One of the following permissions is required:

  • environment:roles:viewer
  • storage:events:read

Parameters​

NameTypeDescription
config.eventType*requiredstringThe event type you're inquiring.

Returns​

Return typeStatus codeDescription
EventType200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await eventsClient.getEventType({
  eventType: "...",
});

getEventTypes​

eventsClient.getEventTypes(config): Promise<EventTypeList>

Lists all event types

One of the following scopes is required:

  • storage:events:read
  • environment-api:events:read

One of the following permissions is required:

  • environment:roles:viewer
  • storage:events:read

Parameters​

NameTypeDescription
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of event types in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

Returns​

Return typeStatus codeDescription
EventTypeList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await eventsClient.getEventTypes();

getEvents​

eventsClient.getEvents(config): Promise<EventList>

Lists events within the specified timeframe

Required scope: environment-api:events:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.entitySelectorstring

The entity scope of the query. You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

The number of entities that can be selected is limited to 10000.

config.eventSelectorstring

Defines the scope of the query. Only events matching the specified criteria are included in the response.

You can add one or several of the criteria listed below. For each criterion you can specify multiple comma-separated values, unless stated otherwise. If several values are specified, the OR logic applies.

  • Event ID: eventId("id-1", "id-2").
  • ID of related entity: entityId("id-1", "id-2").
  • Event status: status("OPEN") or status("CLOSED"). You can specify only one status.
  • Management zone ID: managementZoneId("123", "321").
  • Event type: eventType("event-type"). You can specify only one event type. You can fetch the list of possible event types with the GET event types call.
  • Correlation ID: correlationId("id-1", "id-2").
  • Happened during maintenance (true, false): underMaintenance(true).
  • Notifications are suppressed (true, false): suppressAlert(true).
  • Problem creation is suppressed (true, false): suppressProblem(true).
  • Frequent event (true, false): frequentEvent(true).
  • Event property: property.<key>("value-1", "value-2"). Only properties with the filterable property set to true can be used. You can check event properties via the GET event properties call.

To set several criteria, separate them with commas (,). Only results matching all criteria are included in the response.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two hours is used (now-2h).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of events in a single response payload.

The maximal allowed page size is 1000.

If not set, 100 is used.

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
EventList200Success. The response contains the list of events.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await eventsClient.getEvents();

extensions_2_0Client​

import { extensions_2_0Client } from '@dynatrace-sdk/client-classic-environment-v2';

activateExtensionEnvironmentConfiguration​

⚠️ Deprecated

extensions_2_0Client.activateExtensionEnvironmentConfiguration(config): Promise<ExtensionEnvironmentConfigurationVersion>

Activates the environment configuration from the specified version of the extension 2.0

Required scope: environment-api:extensions:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.body*requiredExtensionEnvironmentConfigurationVersion
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
ExtensionEnvironmentConfigurationVersion200Success. Environment configuration created. If the requested version was already active, this is an idempotent no-op (no backend state changes).

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.activateExtensionEnvironmentConfiguration(
    { extensionName: "...", body: { version: "1.2.3" } },
  );

createMonitoringConfiguration​

extensions_2_0Client.createMonitoringConfiguration(config): Promise<Array<MonitoringConfigurationResponse>>

Creates new monitoring configuration for the specified extension 2.0

Required scope: environment-api:extension-configurations:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configurations:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.body*requiredArray<MonitoringConfigurationDto>
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
MonitoringConfigurationResponse200Success
ErrorEnvelope207Multi-Status, if not all requests resulted in the same status

Throws​

Error TypeError Message
ErrorEnvelopeArrayErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist.
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.createMonitoringConfiguration({
    extensionName: "...",
    body: [{ scope: "HOST-D3A3C5A146830A79" }],
  });
extensions_2_0Client.createMonitoringConfiguration(config): Promise<Array<ErrorEnvelope | MonitoringConfigurationResponse>>

Parameters​

NameTypeDescription
config.body*requiredArray<MonitoringConfigurationDto>
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
MonitoringConfigurationResponse200Success
ErrorEnvelope207Multi-Status, if not all requests resulted in the same status

deleteEnvironmentConfiguration​

⚠️ Deprecated

extensions_2_0Client.deleteEnvironmentConfiguration(config): Promise<ExtensionEnvironmentConfigurationVersion>

Deactivates the environment configuration of the specified extension 2.0

Required scope: environment-api:extensions:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
ExtensionEnvironmentConfigurationVersion200Success. Environment configuration deactivated.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.deleteEnvironmentConfiguration(
    { extensionName: "..." },
  );

executeExtensionMonitoringConfigurationActions​

⚠️ Deprecated

extensions_2_0Client.executeExtensionMonitoringConfigurationActions(config): Promise<ExecuteActionsResponse>

Executes Data Source action of Active Gate or Host

Required scope: environment-api:extension-configuration-actions:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configuration.actions:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.body*requiredExecuteActionsDto
config.configurationId*requiredstringThe ID of the requested monitoring configuration.
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
ExecuteActionsResponse202Accepted. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Authentication failed | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.executeExtensionMonitoringConfigurationActions(
    {
      extensionName: "...",
      configurationId: "...",
      body: {},
    },
  );

extensionConfigurationSchema​

⚠️ Deprecated

extensions_2_0Client.extensionConfigurationSchema(config): Promise<SchemaDefinitionRestDto>

Gets the configuration schema of the specified version of the extension 2.0

One of the following scopes is required:

  • environment-api:extensions:read
  • environment-api:extension-configurations:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.extensionName*requiredstringThe name of the requested extension 2.0.
config.extensionVersion*requiredstringThe version of the requested extension 2.0
Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))?

Returns​

Return typeStatus codeDescription
SchemaDefinitionRestDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.extensionConfigurationSchema({
    extensionName: "...",
    extensionVersion: "...",
  });

extensionDetails​

extensions_2_0Client.extensionDetails(config): Promise<Extension>

Gets details of the specified version of the extension 2.0

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.acceptType*required"application/json; charset=utf-8"
config.extensionName*requiredstringThe name of the requested extension 2.0.
config.extensionVersion*requiredstringThe version of the requested extension 2.0
Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))?

Returns​

Return typeStatus codeDescription
void200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.extensionDetails({
  acceptType: "application/json; charset=utf-8",
  extensionName: "...",
  extensionVersion: "...",
});
extensions_2_0Client.extensionDetails(config): Promise<Binary>

Parameters​

NameTypeDescription
config.acceptType*required"application/octet-stream" | "application/yaml"
config.extensionName*requiredstringThe name of the requested extension 2.0.
config.extensionVersion*requiredstringThe version of the requested extension 2.0
Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))?

Returns​

Return typeStatus codeDescription
void200Success

extensionMonitoringConfigurations​

⚠️ Deprecated

extensions_2_0Client.extensionMonitoringConfigurations(config): Promise<ExtensionMonitoringConfigurationsList>

Lists all the monitoring configurations of the specified extension 2.0

Required scope: environment-api:extension-configurations:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configurations:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.activebooleanFilters the resulting set of configurations by the active state.
config.extensionName*requiredstringThe name of the requested extension 2.0.
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of extensions in a single response payload.

The maximal allowed page size is 100.

If not set, 20 is used.

config.versionstringFilters the resulting set of configurations by extension 2.0 version.

Returns​

Return typeStatus codeDescription
ExtensionMonitoringConfigurationsList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.extensionMonitoringConfigurations(
    { extensionName: "..." },
  );

getActiveEnvironmentConfiguration​

⚠️ Deprecated

extensions_2_0Client.getActiveEnvironmentConfiguration(config): Promise<ExtensionEnvironmentConfigurationVersion>

Gets the active environment configuration version of the specified extension 2.0

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
ExtensionEnvironmentConfigurationVersion200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.getActiveEnvironmentConfiguration(
    { extensionName: "..." },
  );

getActiveGateGroupsInfo​

⚠️ Deprecated

extensions_2_0Client.getActiveGateGroupsInfo(config): Promise<ActiveGateGroupsInfoDto>

List all activeGate groups available for extension

Required scope: environment-api:extension-configurations:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configurations:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.extensionName*requiredstringThe name of the requested extension 2.0.
config.extensionVersion*requiredstringThe version of the requested extension 2.0
Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))?

Returns​

Return typeStatus codeDescription
ActiveGateGroupsInfoDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.getActiveGateGroupsInfo({
    extensionName: "...",
    extensionVersion: "...",
  });

getAlertTemplate​

⚠️ Deprecated

extensions_2_0Client.getAlertTemplate(config): Promise<AlertTemplateDto>

Gets an alert template asset for given ID

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.assetId*requiredstringID of the requested asset.
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
AlertTemplateDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.getAlertTemplate({
  extensionName: "...",
  assetId: "...",
});

getEnvironmentConfigurationAssetsInfo​

⚠️ Deprecated

extensions_2_0Client.getEnvironmentConfigurationAssetsInfo(config): Promise<ExtensionAssetsDto>

Gets the information about assets in an active extension 2.0

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
ExtensionAssetsDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.getEnvironmentConfigurationAssetsInfo(
    { extensionName: "..." },
  );

getExtensionMonitoringConfigurationStatus​

⚠️ Deprecated

extensions_2_0Client.getExtensionMonitoringConfigurationStatus(config): Promise<ExtensionStatusDto>

Gets the most recent status of the execution of given monitoring configuration

Required scope: environment-api:extension-configurations:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configurations:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.configurationId*requiredstringThe ID of the requested monitoring configuration.
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
ExtensionStatusDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.getExtensionMonitoringConfigurationStatus(
    { extensionName: "...", configurationId: "..." },
  );

getExtensionStatus​

⚠️ Deprecated

extensions_2_0Client.getExtensionStatus(config): Promise<Array<ExtensionStatusWithIdDto>>

Gets the most recent status of the execution of monitoring configurations of given extension

Required scope: environment-api:extension-configurations:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configurations:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
ExtensionStatusWithIdDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.getExtensionStatus({
  extensionName: "...",
});

getJmxProcess​

⚠️ Deprecated

extensions_2_0Client.getJmxProcess(config): Promise<JavaProcessDetails>

Retrieves details of a specified Java process discovered in the environment for JMX metric collection. | maturity=EARLY_ADOPTER

Required scope: extensions:discovery.jmx:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.hostIdstringFilters the resulting set of Java processes by the ID of the host they run on, in the form 'HOST-XXXXXXXXXXXXXXXX'. The exact match is required.
config.processId*requiredstringId of the Java process discovered in the environment.

Returns​

Return typeStatus codeDescription
JavaProcessDetails200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Agent data isn't yet available. Try again in a few seconds. | Failed. Agent communication timeout. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.getJmxProcess({
  processId: "...",
});

getPmiProcess​

⚠️ Deprecated

extensions_2_0Client.getPmiProcess(config): Promise<PmiProcessDetails>

Retrieves details of a specified Java process discovered in the environment for PMI metric collection. | maturity=EARLY_ADOPTER

Required scope: extensions:discovery.pmi:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.hostIdstringFilters the resulting set of Java processes by the ID of the host they run on, in the form 'HOST-XXXXXXXXXXXXXXXX'. The exact match is required.
config.processId*requiredstringId of the Java process discovered in the environment.

Returns​

Return typeStatus codeDescription
PmiProcessDetails200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Agent data isn't yet available. Try again in a few seconds. | Failed. Agent communication timeout. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.getPmiProcess({
  processId: "...",
});

getSchemaFile​

⚠️ Deprecated

extensions_2_0Client.getSchemaFile(config): Promise<JsonNode>

Gets the extension 2.0 schema file in the specified version

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.fileName*requiredstringThe name of the schema file.
config.schemaVersion*requiredstringThe version of the schema.
Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))?

Returns​

Return typeStatus codeDescription
JsonNode200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.getSchemaFile({
  schemaVersion: "...",
  fileName: "...",
});

installExtension​

⚠️ Deprecated

extensions_2_0Client.installExtension(config): Promise<RegisteredExtensionResultDto>

Installs Extension from HUB

Required scope: environment-api:extensions:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.extensionName*requiredstringThe name of the requested extension 2.0.
config.versionstringFilters the resulting set of configurations by extension 2.0 version.

Returns​

Return typeStatus codeDescription
RegisteredExtensionResultDto200Success. The extension version is installed and active. If the requested version was already the active environment configuration, this is an idempotent no-op (no backend state changes).

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.installExtension({
  extensionName: "...",
});

listExtensionInfos​

⚠️ Deprecated

extensions_2_0Client.listExtensionInfos(config): Promise<ExtensionInfoList>

Lists all the extensions 2.0 available in your environment with additional metadata

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.namestringFilters the resulting set of extensions 2.0 by name. You can specify a partial name. In that case, the CONTAINS operator is used.
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of extensions in a single response payload.

The maximal allowed page size is 100.

If not set, 20 is used.

Returns​

Return typeStatus codeDescription
ExtensionInfoList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.listExtensionInfos();

listExtensionVersions​

⚠️ Deprecated

extensions_2_0Client.listExtensionVersions(config): Promise<ExtensionList>

Lists all versions of the extension 2.0

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.extensionName*requiredstringThe name of the requested extension 2.0.
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of extensions in a single response payload.

The maximal allowed page size is 100.

If not set, 20 is used.

Returns​

Return typeStatus codeDescription
ExtensionList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.listExtensionVersions({
    extensionName: "...",
  });

listExtensions​

⚠️ Deprecated

extensions_2_0Client.listExtensions(config): Promise<ExtensionList>

Lists all the extensions 2.0 available in your environment

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.namestringFilters the resulting set of extensions 2.0 by name. You can specify a partial name. In that case, the CONTAINS operator is used.
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of extensions in a single response payload.

The maximal allowed page size is 100.

If not set, 20 is used.

Returns​

Return typeStatus codeDescription
ExtensionList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.listExtensions();

listJmxProcesses​

⚠️ Deprecated

extensions_2_0Client.listJmxProcesses(config): Promise<Array<JavaProcessContainerList>>

Lists all Java processes discovered in the environment that are available for JMX metric collection. | maturity=EARLY_ADOPTER

Required scope: extensions:discovery.jmx:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.hostIdstringFilters the resulting set of Java processes by the ID of the host they run on, in the form 'HOST-XXXXXXXXXXXXXXXX'. The exact match is required.

Returns​

Return typeStatus codeDescription
JavaProcessContainerList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.listJmxProcesses();

listPmiProcesses​

⚠️ Deprecated

extensions_2_0Client.listPmiProcesses(config): Promise<Array<JavaProcessContainerList>>

Lists all Java processes discovered in the environment that are available for PMI metric collection. | maturity=EARLY_ADOPTER

Required scope: extensions:discovery.pmi:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.hostIdstringFilters the resulting set of Java processes by the ID of the host they run on, in the form 'HOST-XXXXXXXXXXXXXXXX'. The exact match is required.

Returns​

Return typeStatus codeDescription
JavaProcessContainerList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.listPmiProcesses();

listSchemaFiles​

extensions_2_0Client.listSchemaFiles(config): Promise<SchemaFiles>

Lists all the files available for the specified extension 2.0 schema version

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.acceptType*required"application/json; charset=utf-8"
config.schemaVersion*requiredstringThe version of the schema.
Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))?

Returns​

Return typeStatus codeDescription
void200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.listSchemaFiles({
  acceptType: "application/json; charset=utf-8",
  schemaVersion: "...",
});
extensions_2_0Client.listSchemaFiles(config): Promise<Binary>

Parameters​

NameTypeDescription
config.acceptType*required"application/octet-stream"
config.schemaVersion*requiredstringThe version of the schema.
Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))?

Returns​

Return typeStatus codeDescription
void200Success

listSchemas​

⚠️ Deprecated

extensions_2_0Client.listSchemas(config): Promise<SchemasList>

Lists all the extension 2.0 schemas versions available in your environment

Required scope: environment-api:extensions:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Returns​

Return typeStatus codeDescription
SchemasList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.listSchemas();

monitoringConfigurationAudit​

⚠️ Deprecated

extensions_2_0Client.monitoringConfigurationAudit(config): Promise<AuditLog>

Gets the audit logs of monitoring configuration of given extension

Required scope: environment-api:extension-configurations:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configurations:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.configurationId*requiredstringThe ID of the requested monitoring configuration.
config.extensionName*requiredstringThe name of the requested extension 2.0.
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of extensions in a single response payload.

The maximal allowed page size is 100.

If not set, 20 is used.

config.sortstring

The sorting of audit log entries:

  • timestamp: Oldest first.
  • -timestamp: Newest first.

If not set, the newest first sorting is applied.



Default: -timestamp
config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
AuditLog200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.monitoringConfigurationAudit({
    extensionName: "...",
    configurationId: "...",
  });

monitoringConfigurationDetails​

⚠️ Deprecated

extensions_2_0Client.monitoringConfigurationDetails(config): Promise<ExtensionMonitoringConfiguration>

Gets the details of the specified monitoring configuration

Required scope: environment-api:extension-configurations:read One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configurations:read

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.configurationId*requiredstringThe ID of the requested monitoring configuration.
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
ExtensionMonitoringConfiguration200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.monitoringConfigurationDetails(
    { extensionName: "...", configurationId: "..." },
  );

removeExtension​

⚠️ Deprecated

extensions_2_0Client.removeExtension(config): Promise<Extension>

Deletes the specified version of the extension 2.0

Required scope: environment-api:extensions:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.extensionName*requiredstringThe name of the requested extension 2.0.
config.extensionVersion*requiredstringThe version of the requested extension 2.0
Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))?

Returns​

Return typeStatus codeDescription
Extension200Success. The extension 2.0 version has been deleted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.removeExtension({
  extensionName: "...",
  extensionVersion: "...",
});

removeMonitoringConfiguration​

⚠️ Deprecated

extensions_2_0Client.removeMonitoringConfiguration(config): Promise<void>

Deletes the specified monitoring configuration

Required scope: environment-api:extension-configurations:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configurations:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.configurationId*requiredstringThe ID of the requested monitoring configuration.
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.removeMonitoringConfiguration({
    extensionName: "...",
    configurationId: "...",
  });

updateExtensionEnvironmentConfiguration​

⚠️ Deprecated

extensions_2_0Client.updateExtensionEnvironmentConfiguration(config): Promise<ExtensionEnvironmentConfigurationVersion>

Updates the active environment configuration version of the extension 2.0

Required scope: environment-api:extensions:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.body*requiredExtensionEnvironmentConfigurationVersion
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
ExtensionEnvironmentConfigurationVersion200Success. Environment configuration updated.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.updateExtensionEnvironmentConfiguration(
    { extensionName: "...", body: { version: "1.2.3" } },
  );

updateMonitoringConfiguration​

⚠️ Deprecated

extensions_2_0Client.updateMonitoringConfiguration(config): Promise<MonitoringConfigurationResponse>

Updates the specified monitoring configuration

Required scope: environment-api:extension-configurations:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:configurations:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.body*requiredMonitoringConfigurationUpdateDto
config.configurationId*requiredstringThe ID of the requested monitoring configuration.
config.extensionName*requiredstringThe name of the requested extension 2.0.

Returns​

Return typeStatus codeDescription
MonitoringConfigurationResponse200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await extensions_2_0Client.updateMonitoringConfiguration({
    extensionName: "...",
    configurationId: "...",
    body: {},
  });

uploadExtension​

⚠️ Deprecated

extensions_2_0Client.uploadExtension(config): Promise<ExtensionUploadResponseDto>

Uploads or verifies a new extension 2.0

Required scope: environment-api:extensions:write One of the following permissions is required:

  • environment:roles:manage-settings
  • extensions:definitions:write

Deprecated since version 1.342. Use the successor API /platform/extensions/v2 instead.

Parameters​

NameTypeDescription
config.body*requiredBlob
config.validateOnlybooleanOnly run validation but do not persist the extension even if validation was successful.

Default: false

Returns​

Return typeStatus codeDescription
ExtensionUploadResponseDto200The extension is valid
ExtensionUploadResponseDto201Success. The extension 2.0 has been uploaded.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input file is invalid. | Upload not possible yet, please try again in a few seconds. | Client side error. | Server side error.

Code example

import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await extensions_2_0Client.uploadExtension({
  body: new Blob(),
});

fleetManagementContainerImagesClient​

import { fleetManagementContainerImagesClient } from '@dynatrace-sdk/client-classic-environment-v2';

getContainerImages​

fleetManagementContainerImagesClient.getContainerImages(config): Promise<ContainerImageData>

Returns container images data

One of the following scopes is required:

  • environment-api:deployment:download
  • fleet-management:container-images:read

One of the following permissions is required:

  • environment:roles:agent-install
  • fleet-management:container-images:read

Returns container image references for Dynatrace components from the specified registry. Returned image versions are resolved based on the configured target versions: dynatrace-activegate, dynatrace-eec, dynatrace-sql-extension-executor, and dynatrace-database-datasource-executor image versions are resolved from the ActiveGate target version; dynatrace-oneagent, dynatrace-codemodules, and dynatrace-logmodule image versions are resolved from the OneAgent target version. If no target version is configured for a component, the latest available image is returned.

Parameters​

NameTypeDescription
config.registrystringRegistry name containing the container images. For a list of registries, see Dynatrace Documentation
config.registryFilterstringPartial registry name filter. Returns images for the first registry whose name contains this value. Ignored when 'registry' is provided.

Returns​

Return typeStatus codeDescription
ContainerImageData200Container images data returned

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Internal server error. | Client side error. | Server side error.

Code example

import { fleetManagementContainerImagesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await fleetManagementContainerImagesClient.getContainerImages();

javaScriptMappingFilesClient​

import { javaScriptMappingFilesClient } from '@dynatrace-sdk/client-classic-environment-v2';

deleteJavaScriptMappingFile​

⚠️ Deprecated

javaScriptMappingFilesClient.deleteJavaScriptMappingFile(config): Promise<void>

Deletes the specified JavaScript mapping file

Required scope: deobfuscation:symbol-files:delete

Parameters​

NameTypeDescription
config.fileType*required"MINIFIED" | "SOURCE" | "SOURCEMAP"The type of the JavaScript mapping file.
config.minifiedJsFileUrl*requiredstringThe URL of the minified JavaScript file.

Returns​

Return typeStatus codeDescription
void200Success. File deleted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await javaScriptMappingFilesClient.deleteJavaScriptMappingFile(
    { minifiedJsFileUrl: "...", fileType: "MINIFIED" },
  );

deleteJavaScriptMappingFileAlias​

javaScriptMappingFilesClient.deleteJavaScriptMappingFileAlias(config): Promise<void>

Deletes the specified JavaScript mapping file

Required scope: deobfuscation:symbol-files:delete

Parameters​

NameTypeDescription
config.fileType*required"MINIFIED" | "SOURCE" | "SOURCEMAP"The type of the JavaScript mapping file.
config.minifiedJsFileUrl*requiredstringThe URL of the minified JavaScript file.

Returns​

Return typeStatus codeDescription
void200Success. File deleted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await javaScriptMappingFilesClient.deleteJavaScriptMappingFileAlias(
    { minifiedJsFileUrl: "...", fileType: "MINIFIED" },
  );

getJavaScriptMappingFilesMetadata​

⚠️ Deprecated

javaScriptMappingFilesClient.getJavaScriptMappingFilesMetadata(config): Promise<JavaScriptMappingFileListDto>

Lists metadata of JavaScript mapping files

Required scope: deobfuscation:symbol-files:read

Parameters​

NameTypeDescription
config.fileType"MINIFIED" | "SOURCE" | "SOURCEMAP"Filters the resulting set of JavaScript mapping files by file type.
config.minifiedJsFileUrlstringFilters the resulting set of JavaScript mapping files by the minified JavaScript file URL. Only equals are taken into account.
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of JavaScript mapping files in a single response payload.

The maximal allowed page size is 100.

If not set, 20 is used.

Returns​

Return typeStatus codeDescription
JavaScriptMappingFileListDto200Success.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await javaScriptMappingFilesClient.getJavaScriptMappingFilesMetadata();

getJavaScriptMappingFilesMetadataAlias​

javaScriptMappingFilesClient.getJavaScriptMappingFilesMetadataAlias(config): Promise<JavaScriptMappingFileListDto>

Lists metadata of JavaScript mapping files

Required scope: deobfuscation:symbol-files:read

Parameters​

NameTypeDescription
config.fileType"MINIFIED" | "SOURCE" | "SOURCEMAP"Filters the resulting set of JavaScript mapping files by file type.
config.minifiedJsFileUrlstringFilters the resulting set of JavaScript mapping files by the minified JavaScript file URL. Only equals are taken into account.
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of JavaScript mapping files in a single response payload.

The maximal allowed page size is 100.

If not set, 20 is used.

Returns​

Return typeStatus codeDescription
JavaScriptMappingFileListDto200Success.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await javaScriptMappingFilesClient.getJavaScriptMappingFilesMetadataAlias();

updateJavaScriptMappingFileMetadata​

⚠️ Deprecated

javaScriptMappingFilesClient.updateJavaScriptMappingFileMetadata(config): Promise<JavaScriptMappingFileDto>

Updates metadata of the specified JavaScript mapping file

Required scope: deobfuscation:symbol-files:write

Parameters​

NameTypeDescription
config.body*requiredJavaScriptMappingFileMetadataDto
config.fileType*required"MINIFIED" | "SOURCE" | "SOURCEMAP"The type of the JavaScript mapping file.
config.minifiedJsFileUrl*requiredstringThe URL of the minified JavaScript file.

Returns​

Return typeStatus codeDescription
JavaScriptMappingFileDto200Success. Metadata updated.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await javaScriptMappingFilesClient.updateJavaScriptMappingFileMetadata(
    {
      minifiedJsFileUrl: "...",
      fileType: "MINIFIED",
      body: {},
    },
  );

updateJavaScriptMappingFileMetadataAlias​

javaScriptMappingFilesClient.updateJavaScriptMappingFileMetadataAlias(config): Promise<JavaScriptMappingFileDto>

Updates metadata of the specified JavaScript mapping file

Required scope: deobfuscation:symbol-files:write

Parameters​

NameTypeDescription
config.body*requiredJavaScriptMappingFileMetadataDto
config.fileType*required"MINIFIED" | "SOURCE" | "SOURCEMAP"The type of the JavaScript mapping file.
config.minifiedJsFileUrl*requiredstringThe URL of the minified JavaScript file.

Returns​

Return typeStatus codeDescription
JavaScriptMappingFileDto200Success. Metadata updated.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await javaScriptMappingFilesClient.updateJavaScriptMappingFileMetadataAlias(
    {
      minifiedJsFileUrl: "...",
      fileType: "MINIFIED",
      body: {},
    },
  );

uploadJavaScriptMappingFile​

⚠️ Deprecated

javaScriptMappingFilesClient.uploadJavaScriptMappingFile(config): Promise<void>

Uploads new or updates existing JavaScript mapping file

Required scope: deobfuscation:symbol-files:write

Parameters​

NameTypeDescription
config.body*requiredUploadJavaScriptMappingFileBody
config.fileType*required"MINIFIED" | "SOURCE" | "SOURCEMAP"The type of the JavaScript mapping file.
config.minifiedJsFileUrl*requiredstringThe URL of the minified JavaScript file.

Returns​

Return typeStatus codeDescription
void200Success. The file has been uploaded and stored. Existing file replaced.
void201Success. The file has been uploaded and stored.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The symbol file storage quota is exhausted. | Client side error. | Server side error.

Code example

import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await javaScriptMappingFilesClient.uploadJavaScriptMappingFile(
    {
      minifiedJsFileUrl: "...",
      fileType: "MINIFIED",
      body: { file: "..." },
    },
  );

uploadJavaScriptMappingFileAlias​

javaScriptMappingFilesClient.uploadJavaScriptMappingFileAlias(config): Promise<void>

Uploads new or updates existing JavaScript mapping file

Required scope: deobfuscation:symbol-files:write

Parameters​

NameTypeDescription
config.body*requiredUploadJavaScriptMappingFileAliasBody
config.fileType*required"MINIFIED" | "SOURCE" | "SOURCEMAP"The type of the JavaScript mapping file.
config.minifiedJsFileUrl*requiredstringThe URL of the minified JavaScript file.

Returns​

Return typeStatus codeDescription
void200Success. The file has been uploaded and stored. Existing file replaced.
void201Success. The file has been uploaded and stored.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The symbol file storage quota is exhausted. | Client side error. | Server side error.

Code example

import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await javaScriptMappingFilesClient.uploadJavaScriptMappingFileAlias(
    {
      minifiedJsFileUrl: "...",
      fileType: "MINIFIED",
      body: { file: "..." },
    },
  );

logsClient​

import { logsClient } from '@dynatrace-sdk/client-classic-environment-v2';

exportLogRecords​

⚠️ Deprecated

logsClient.exportLogRecords(config): Promise<ExportedLogRecordList>

Exports log records | maturity=EARLY_ADOPTER

Required scope: storage:logs:read One of the following permissions is required:

  • environment:roles:logviewer
  • storage:logs:read

Returns the first X records (specified in the pageSize query parameter).

Unlike the search API, this API does not split the result into slices and has no limit for the total number of records. Log records are sorted by the criteria specified in the sort query parameter.

In order to fetch large amount of records (exceeding the pageSize value), one should repeat the export call with nextPageKey param.

Please note that export works only for Logs Classic.

Parameters​

NameTypeDescription
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumberThe number of results per result page.

Default: 1000
Minimum: 1
config.querystring

The log search query.

The query must use the Dynatrace search query language.

config.sortstring

Defines the ordering of the log records.

Each field has a sign prefix (+/-) for sorting order. If no sign prefix is set, then the + option will be applied.

Currently, ordering is available only for the timestamp (+timestamp for the oldest records first, or -timestamp for the newest records first).

When millisecond resolution provided by the timestamp is not enough, log records are sorted based on the order in which they appear in the log source (remote process writing to REST API endpoint or remote process from which logs are collected).



Default: -timestamp
Pattern: ^[+-]?[a-z]+$
config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
ExportedLogRecordList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The server either does not recognize the request method, or it lacks the ability to fulfill the request. May happen when Grail log storage is enabled. | Client side error. | Server side error.

Code example

import { logsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await logsClient.exportLogRecords();

getLogHistogramData​

⚠️ Deprecated

logsClient.getLogHistogramData(config): Promise<AggregatedLog>

Gets aggregated log records | maturity=EARLY_ADOPTER

Required scope: storage:logs:read One of the following permissions is required:

  • environment:roles:logviewer
  • storage:logs:read

Returns the aggregated number of occurrences of log values divided into time slots.

It is possible that the timeframe covered by results exceeds the specified timeframe. In that case the request returns fewer time slots than specified in the timeBuckets query parameter.

If Log Management and Analytics, powered by Grail is enabled, then a platform token or bearer OAuth token (with storage:logs:read and storage:buckets:read scopes) needs to be used for authentication.

Logs on Grail:

It is not recommended to run Grail queries using Logs v2 API, please use Grail API instead.

Parameters​

NameTypeDescription
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

config.groupByArray<string>

The groupings to be included in the response.

You can specify several groups in the following format: groupBy=status&groupBy=log.source.

If not set, all possible groups are returned. You can use this option to check for possible grouping values.

Unique log data attributes (high-cardinality attributes) for example, span_id or trace_id cannot be used for grouping.

config.maxGroupValuesnumber

The maximum number of values in each group.

You can get up to 100 values per group.

If not set, 10 is used.



Default: 10
Minimum: 1
config.querystring

The log search query.

The query must use the Dynatrace search query language.

config.timeBucketsnumber

The number of time slots in the result.

The query timeframe is divided equally into the specified number of slots.

The minimum length of a slot is 1 ms.

If not set, 1 is used.



Default: 1
Minimum: 1
config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
AggregatedLog200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { logsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await logsClient.getLogHistogramData();

getLogRecords​

⚠️ Deprecated

logsClient.getLogRecords(config): Promise<LogRecordsList>

Reads log records | maturity=EARLY_ADOPTER

Required scope: storage:logs:read One of the following permissions is required:

  • environment:roles:logviewer
  • storage:logs:read

Returns the first X records (specified in the limit query parameter). Log records are sorted by the criteria specified in the sort query parameter.

If the query is too large to be processed in a single request, it is divided into slices (slices are unsupported on Log Management and Analytics, powered by Grail). In that case the first response contains the nextSliceKey cursor for the second slice. Use it in the nextSliceKey query parameter to obtain the second slice, which contains nextSliceKey cursor for the third slice, and so on.

Results can be distributed unevenly between slices and some slices might be empty.

If Log Management and Analytics, powered by Grail is enabled, then a platform token or bearer OAuth token (with storage:logs:read and storage:buckets:read scopes) needs to be used for authentication.

Logs on Grail:

It is not recommended to run Grail queries using Logs v2 API, please use Grail API instead.

Parameters​

NameTypeDescription
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

config.limitnumber

The desired amount of log records.

The maximal allowed limit is 1000.

If not set, 1000 is used.



Default: 1000
Minimum: 1
config.nextSliceKeystring

The cursor for the next slice of results. You can find it in the nextSliceKey field of the previous response.

The first slice is always returned if you don't specify this parameter.

If this parameter is set, all other query parameters are ignored.

Unsupported on Log Management and Analytics, powered by Grail.

config.querystring

The log search query.

The query must use the Dynatrace search query language.

config.sortstring

Defines the ordering of the log records.

Each field has a sign prefix (+/-) for sorting order. If no sign prefix is set, then the + option will be applied.

Currently, ordering is available only for the timestamp (+timestamp for the oldest records first, or -timestamp for the newest records first).

When millisecond resolution provided by the timestamp is not enough, log records are sorted based on the order in which they appear in the log source (remote process writing to REST API endpoint or remote process from which logs are collected).



Default: -timestamp
Pattern: ^[+-]?[a-z]+$
config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
LogRecordsList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { logsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await logsClient.getLogRecords();

storeLog​

logsClient.storeLog(config): Promise<void | SuccessEnvelope>

Pushes log records to Dynatrace

One of the following scopes is required:

  • openpipeline:logs:ingest
  • storage:logs:write

Ingested logs are stored in Dynatrace.

If you are using this API endpoint on an Environment ActiveGate, the Log Analytics Collector module must be enabled. This endpoint is not available on Containerized ActiveGate (including Kubernetes deployments).

This endpoint accepts arbitrary query parameters, which are processed as log attribute key-value pairs and added to each ingested log record following the standard rules for log attributes.

Error handling:

It is recommended to use an exponential backoff strategy when retrying requests.

Parameters​

NameTypeDescription
config.body*requiredLogMessageJson | LogMessagePlain
config.type*required"application/json; charset=utf-8" | "application/json" | "application/jsonl" | "application/jsonl; charset=utf-8" | "application/jsonlines" | "application/jsonlines+json" | "application/jsonlines+json; charset=utf-8" | "application/jsonlines; charset=utf-8" | "application/x-jsonlines" | "application/x-jsonlines; charset=utf-8" | "application/x-ndjson" | "application/x-ndjson; charset=utf-8" | "text/plain; charset=utf-8"
config.contentTypestring(Optional) Allows to provide content type with query parameter. Has priority over value provided in Content-Type header.
config.structure"raw" | "flattened"(Optional) Data model used for structuring the input into log records. Allowed values: raw, flattened. For more details, refer to the documentation.
config.xDynatraceAttrstring(Optional) Contains ampersand‑separated key–value pairs representing additional log attributes to be added to each ingested log record. If the same key appears multiple times, all values are captured as a multi‑value attribute. Query parameters take precedence over values provided in this header. For more details, refer to the documentation.
config.xDynatraceOptionsstring(Optional) Contains ampersand-separated Dynatrace-specific parameters. Supported options: (SaaS only) structure (values: raw, flattened) defines how input data is structured into log records. Query parameters take precedence over header values. For more details, refer to the documentation.

Returns​

Return typeStatus codeDescription
SuccessEnvelope200Only a part of input events were ingested due to event invalidity. For details, check the response body.
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. This is due either to the status of your licensing agreement or because you've exhausted your DPS license. | Failed. The requested resource doesn't exist. This may happen when no ActiveGate is available with the Log Analytics Collector module enabled. | Failed. Request payload size is too big. This may happen when the payload byte size exceeds the limit or when the ingested payload is a JSON array with the size exceeding the limit. | Failed. Too Many Requests. This may happen when ActiveGate is unable to process more requests at the moment or when log ingest is disabled. Retryable with exponential backoff strategy. | Failed. The server either does not recognize the request method, or it lacks the ability to fulfil the request. In Log Monitoring Classic, this may happen when indexed log storage is not enabled. | Failed. The server is currently unable to handle the request. This may happen when ActiveGate is overloaded. Retryable with exponential backoff strategy. | Client side error. | Server side error.

Code example

import { logsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await logsClient.storeLog({
  type: "application/json",
  body: [
    {
      content:
        "Exception: Custom error log sent via Generic Log Ingest",
      "log.source": "/var/log/syslog",
      timestamp: "2025-12-17T22:12:31.0000",
      severity: "error",
      "custom.attribute": "attribute value",
      complex: {
        "key-1": "attribute value-1",
        "key-2": 234.2,
      },
      "array.attr": [
        "value-1",
        1,
        null,
        true,
        [1, 2, 3],
        { key: "value" },
      ],
    },
    {
      message: "User1 logged in successfully",
      "log.source": "/var/log/syslog",
      "@timestamp": "1765281600",
    },
    {
      payload:
        "Exception: Custom error log sent via Generic Log Ingest",
      "log.source": "/var/log/syslog",
    },
    { log: "My log message without additional attributes" },
  ],
});

metricsClient​

import { metricsClient } from '@dynatrace-sdk/client-classic-environment-v2';

allMetrics​

metricsClient.allMetrics(config): Promise<MetricDescriptorCollection>

Lists all available metrics

Required scope: environment-api:metrics:read Required permission: environment:roles:viewer

You can narrow down the output by selecting metrics in the metricSelector field.

You can additionally limit the output by using pagination:

  1. Specify the number of results per page in the pageSize query parameter.

  2. Then use the cursor from the nextPageKey field of the response in the nextPageKey query parameter to obtain subsequent pages. All other query parameters must be omitted.

Parameters​

NameTypeDescription
config.acceptType*required"application/json; charset=utf-8" | "text/csv; header=absent; charset=utf-8" | "text/csv; header=present; charset=utf-8"
config.fieldsstring

Defines the list of metric properties included in the response.

metricId is always included in the result. The following additional properties are available:

  • displayName: The name of the metric in the user interface. Enabled by default.
  • description: A short description of the metric. Enabled by default.
  • unit: The unit of the metric. Enabled by default.
  • tags: The tags of the metric.
  • dduBillable: An indicator whether the usage of metric consumes Davis data units. Deprecated and always false for Dynatrace Platform Subscription. Superseded by billable.
  • billable: An indicator whether the usage of metric is billable.
  • created: The timestamp (UTC milliseconds) when the metrics has been created.
  • lastWritten: The timestamp (UTC milliseconds) when metric data points have been written for the last time.
  • aggregationTypes: The list of allowed aggregations for the metric. Note that it may be different after a transformation is applied.
  • defaultAggregation: The default aggregation of the metric. It is used when no aggregation is specified or the :auto transformation is set.
  • dimensionDefinitions: The fine metric division (for example, process group and process ID for some process-related metric).
  • transformations: A list of transformations that can be applied to the metric.
  • entityType: A list of entity types supported by the metric.
  • minimumValue: The minimum allowed value of the metric.
  • maximumValue: The maximum allowed value of the metric.
  • rootCauseRelevant: Whether (true or false) the metric is related to a root cause of a problem. A root-cause relevant metric represents a strong indicator for a faulty component.
  • impactRelevant: Whether (true or false) the metric is relevant to a problem's impact. An impact-relevant metric is highly dependent on other metrics and changes because an underlying root-cause metric has changed.
  • metricValueType: The type of the metric's value. You have these options:
    • score: A score metric is a metric where high values indicate a good situation, while low values indicate trouble. An example of such a metric is a success rate.
    • error: An error metric is a metric where high values indicate trouble, while low values indicate a good situation. An example of such a metric is an error count.
  • latency: The latency of the metric, in minutes. The latency is the expected reporting delay (for example, caused by constraints of cloud vendors or other third-party data sources) between the observation of a metric data point and its availability in Dynatrace. The allowed value range is from 1 to 60 minutes.
  • metricSelector: The underlying metric selector used by a func: metric.
  • scalar: Indicates whether the metric expression resolves to a scalar (true) or to a series (false). A scalar result always contains one data point. The amount of data points in a series result depends on the resolution you're using.
  • resolutionInfSupported: If true, resolution=Inf can be applied to the metric query.
  • unitDisplayFormat: The numeral system used to display byte/bit values. Can be binary (1 MiB = 1024 KiB) or decimal (1 MB = 1000 kB).
  • exported: Indicates whether the metric has been exported to Grail.
  • dimensionCardinalities: Cardinality statistics for each dimension of a MINT metric, including the estimated number of unique values and relative percentage.

To add properties, list them with leading plus +. To exclude default properties, list them with leading minus -.

To specify several properties, join them with a comma (for example fields=+aggregationTypes,-description).

If you specify just one property, the response contains the metric key and the specified property. To return metric keys only, specify metricId here.

config.metadataSelectorstring

The metadata scope of the query. Only metrics with specified properties are included to the response.

You can set one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used. If several values are specified, the OR logic applies.

  • unit("unit-1","unit-2")

  • tags("tag-1","tag-2")

  • dimensionKey("dimkey-1","dimkey-2"). The filtering applies only to dimensions that were written within the last 14 days.

  • custom("true"). "true" to include only user-defined metrics metrics (without namespace or with ext:, calc:, func:, appmon:), "false" to filter them out.

  • exported("true"). "true" to include only exported metrics, "false" to filter them out.

To set several criteria, separate them with a comma (,). For example, tags("feature","cloud"),unit("Percent"),dimensionKey("location"),custom("true"). Only results matching all criteria are included in response.

For example, to list metrics that have the tags feature AND cloud with a unit of Percent OR MegaByte AND a dimension with a dimension key location, use this metadataSelector: tags("feature"),unit("Percent","MegaByte"),tags("cloud"),dimensionKey("location").

config.metricSelectorstring

Selects metrics for the query by their keys.

You can specify multiple metric keys separated by commas (for example, metrickey1,metrickey2). To select multiple metrics belonging to the same parent, list the last part of the required metric keys in parentheses, separated by commas, while keeping the common part untouched. For example, to list the builtin:host.cpu.idle and builtin:host.cpu.user metric, write: builtin:host.cpu.(idle,user).

You can select a full set of related metrics by using a trailing asterisk (*) wildcard. For example, builtin:host.* selects all host-based metrics and builtin:* selects all Dynatrace-provided metrics.

You can set additional transformation operators, separated by a colon (:). See Metrics selector transformations in Dynatrace Documentation for additional information on available result transformations and syntax.

Only aggregation, merge, parents, and splitBy transformations are supported by this endpoint.

If the metric key contains any symbols you must quote (") the key. The following characters inside of a quoted metric key must be escaped with a tilde (~):

  • Quotes (")
  • Tildes (~)

For example, to query the metric with the key of ext:selfmonitoring.jmx.Agents: Type "APACHE" you must specify this selector:

"ext:selfmonitoring.jmx.Agents: Type ~"APACHE~""

To find metrics based on a search term, rather than metricId, use the text query parameter instead of this one.

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of metric schemata in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

If a value higher than 500 is used, only 500 results per page are returned.

config.textstringMetric registry search term. Only show metrics that contain the term in their key, display name, or description. Use the metricSelector parameter instead of this one to select a complete metric hierarchy instead of doing a text-based search.
config.writtenSincestring

Filters the resulted set of metrics to those that have data points within the specified timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years
config.writtenSinceModestring

Controls how the writtenSince filter is applied.

  • INCLUDE: Includes only metrics that have been written since the specified writtenSince timestamp (filters out metrics not written since then).
  • EXCLUDE: Excludes metrics that have been written since the specified writtenSince timestamp (only returns metrics not written since then).

If not specified, the default is INCLUDE.

Returns​

Return typeStatus codeDescription
MetricDescriptorCollection200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await metricsClient.allMetrics({
  acceptType: "application/json; charset=utf-8",
});

bulkDelete​

metricsClient.bulkDelete(config): Promise<void>

Deletes all unused metrics within the specified number of days

Required scope: environment-api:metrics:write Required permission: environment:roles:manage-settings

You can only delete metrics that have been ingested via the Metrics v2 API. Deleted metrics cannot be recovered.

Parameters​

NameTypeDescription
config.metricSelector*requiredstring

Selects metrics to be considered for deletion.

You can select a full set of related metrics by using a trailing asterisk (*) wildcard. For example, airflow_* selects all custom airflow metrics, * selects all custom metrics.

config.minUnusedDays*requirednumberThe number of days since the metric was last used. Must be between 30 and 1825 (5 years).

Minimum: 30

Returns​

Return typeStatus codeDescription
void202Success. The deletion of the metrics has been triggered.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await metricsClient.bulkDelete({
  metricSelector: "...",
  minUnusedDays: 10,
});

delete​

metricsClient.delete(config): Promise<void>

Deletes the specified metric

Required scope: environment-api:metrics:write Required permission: environment:roles:manage-settings

Deletion cannot be undone! You can't delete a metric if it has data points ingested within the last two hours.

Parameters​

NameTypeDescription
config.metricKey*requiredstringThe key of the required metric.

Returns​

Return typeStatus codeDescription
void202Success. The deletion of the metric has been triggered.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await metricsClient.delete({
  metricKey: "...",
});

ingest​

metricsClient.ingest(config): Promise<ValidationResponse>

Pushes metric data points to Dynatrace

One of the following scopes is required:

  • storage:metrics:write
  • openpipeline:metrics:ingest

Parameters​

NameType
config.body*requiredstring

Returns​

Return typeStatus codeDescription
void202The provided business events are all accepted and will be processed.

Throws​

Error TypeError Message
ValidationResponseErrorSome data points are invalid. Valid data points are accepted and will be processed in the background.
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await metricsClient.ingest({
  body: "server.cpu.temperature,cpu.id=0 42",
});

metric​

metricsClient.metric(config): Promise<MetricDescriptor>

Gets the descriptor of the specified metric

Required scope: environment-api:metrics:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.acceptType*required"application/json; charset=utf-8" | "text/csv; header=absent; charset=utf-8" | "text/csv; header=present; charset=utf-8"
config.metricKey*requiredstring

The key of the required metric.

You can set additional transformation operators, separated by a colon (:). See Metrics selector transformations in Dynatrace Documentation for additional information on available result transformations and syntax.

Returns​

Return typeStatus codeDescription
MetricDescriptor200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await metricsClient.metric({
  acceptType: "application/json; charset=utf-8",
  metricKey: "...",
});

query​

metricsClient.query(config): Promise<MetricData>

Gets data points of the specified metrics

Required scope: environment-api:metrics:read Required permission: environment:roles:viewer

The following limits apply:

  • The amount of aggregated data points in the response is limited to 1,000
  • The amount of series in the response is limited to 1,000
    • The amount of data points per series is limited to 10,080 (minutes of one week)
    • The overall amount of data points is limited to 100,000

The dataPointCountRatio specifies the ratio of queried data points divided by the maximum number of data points per metric that are allowed in a single query. The dimensionCountRatio specifies the ratio of queried dimension tuples divided by the maximum number of dimension tuples allowed in a single query.

Parameters​

NameTypeDescription
config.acceptType*required"application/json; charset=utf-8" | "text/csv; header=absent; charset=utf-8" | "text/csv; header=present; charset=utf-8"
config.entitySelectorstring

Specifies the entity scope of the query. Only data points delivered by matched entities are included in response.

You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

Use the GET /metrics/\{metricId} call to fetch the list of possible entity types for your metric.

To set a universal scope matching all entities, omit this parameter.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two hours is used (now-2h).

config.metricSelectorstring

Selects metrics for the query by their keys. You can select up to 10 metrics for one query.

You can specify multiple metric keys separated by commas (for example, metrickey1,metrickey2). To select multiple metrics belonging to the same parent, list the last part of the required metric keys in parentheses, separated by commas, while keeping the common part untouched. For example, to list the builtin:host.cpu.idle and builtin:host.cpu.user metric, write: builtin:host.cpu.(idle,user).

If the metric key contains any symbols you must quote (") the key. The following characters inside of a quoted metric key must be escaped with a tilde (~):

  • Quotes (")
  • Tildes (~)

For example, to query the metric with the key of ext:selfmonitoring.jmx.Agents: Type "APACHE" you must specify this selector:

"ext:selfmonitoring.jmx.Agents: Type ~"APACHE~""

You can set additional transformation operators, separated by a colon (:). See Metrics selector transformations in Dynatrace Documentation for additional information on available result transformations and syntax.

config.mzSelectorstring

The management zone scope of the query. Only metrics data relating to the specified management zones are included to the response.

You can set one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used. If several values are specified, the OR logic applies.

  • mzId(123,456)
  • mzName("name-1","name-2") To set several criteria, separate them with a comma (,). For example, mzName("name-1","name-2"),mzId(1234). Only results matching all of the criteria are included in the response.For example, to list metrics that have the id 123 OR 234 AND the name name-1 OR name-2, use this mzSelector: `mzId(123,234),mzName("name-1","name-2").
config.resolutionstring

The desired resolution of data points.

You can use one of the following options:

  • The desired amount of data points. This is the default option. This is a reference number of points, which is not necessarily equal to the number of the returned data points.
  • The desired timespan between data points. This is a reference timespan, which is not necessarily equal to the returned timespan. To use this option, specify the unit of the timespan.

Valid units for the timespan are:

  • m: minutes
  • h: hours
  • d: days
  • w: weeks
  • M: months
  • q: quarters
  • y: years

If not set, the default is 120 data points.

For example:

  • Get data points which are 10 minutes apart: resolution=10m
  • Get data points which are 3 weeks apart: resolution=3w

You can also specify multiple resolutions for a single query using index-based formatting. This allows each metric expression in a multi-expression selector to have its own resolution.

Use the format: <index>:<resolution>(,<index>:<resolution>)* Where:

  • index is the zero-based position of the metric expression in the metricSelector list.
  • resolution is either a number of data points (e.g., 120) or a timespan with a unit (e.g., 10m, 3w).

If a resolution is not specified for a given index, the default of 120 data points is applied.

Examples:

  • resolution=0:Inf → First metric uses resolution Inf, second metric uses default (120 data points).
  • resolution=0:Inf,1:10 → First metric uses Inf, second metric uses 10 data points.
  • resolution=Inf → All metrics use resolution Inf. Note: If multiple resolutions are used, the resolution field in the response is the smallest resolution.
config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
MetricData200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await metricsClient.query({
  acceptType: "application/json; charset=utf-8",
});

metricsUnitsClient​

import { metricsUnitsClient } from '@dynatrace-sdk/client-classic-environment-v2';

allUnits​

metricsUnitsClient.allUnits(config): Promise<UnitList>

Lists all available units

Required scope: environment-api:metrics:read Required permission: environment:roles:viewer

You can narrow down the output by providing filter criteria in the unitSelector field.

Parameters​

NameTypeDescription
config.fieldsstring

Defines the list of properties to be included in the response. The ID of the unit is always included. The following additional properties are available:

  • displayName: The display name of the unit.
  • symbol: The symbol of the unit.
  • description: A short description of the unit.

By default, the ID, the display name, and the symbol are included.

To add properties, list them with leading plus +. To exclude default properties, list them with leading minus -.

To specify several properties, join them with a comma (for example fields=+description,-symbol).

If you specify just one property, the response contains the unitId and the specified property. To return unit IDs only, specify unitId here.

config.unitSelectorstring

Selects units to be included to the response. Available criteria:

  • Compatibility: compatibleTo("unit","display-format"). Returns units that can be converted to the specified unit. The optional display format (binary or decimal) argument is supported by bit- and byte-based units and returns only units for the specified format.

Returns​

Return typeStatus codeDescription
UnitList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { metricsUnitsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await metricsUnitsClient.allUnits();

convert​

metricsUnitsClient.convert(config): Promise<UnitConversionResult>

Converts a value from a source unit into a target unit

Required scope: environment-api:metrics:read Required permission: environment:roles:viewer

If no target unit is set, the request finds an appropriate target unit automatically, taking into account the preferred number format (if specified).

Parameters​

NameTypeDescription
config.numberFormatstring

The preferred number format of the target value. You can specify the following formats:

  • binary
  • decimal

`Only used if the target unit if not set.

config.targetUnitstring

The ID of the target unit.

If not set, the request finds an appropriate target unit automatically, based on the specified number format.

config.unitId*requiredstringThe ID of the source unit.
config.value*requirednumberThe value to be converted.

Returns​

Return typeStatus codeDescription
UnitConversionResult200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { metricsUnitsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await metricsUnitsClient.convert({
  unitId: "...",
  value: 10,
});

unit​

metricsUnitsClient.unit(config): Promise<Unit>

Gets the properties of the specified unit

Required scope: environment-api:metrics:read Required permission: environment:roles:viewer

Parameters​

NameType
config.unitId*requiredstring

Returns​

Return typeStatus codeDescription
Unit200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { metricsUnitsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await metricsUnitsClient.unit({
  unitId: "...",
});

mobileDeobfuscationAndSymbolicationClient​

import { mobileDeobfuscationAndSymbolicationClient } from '@dynatrace-sdk/client-classic-environment-v2';

delete_1​

mobileDeobfuscationAndSymbolicationClient.delete_1(config): Promise<void>

Deletes React Native mapping file | maturity=EARLY_ADOPTER

Required scope: deobfuscation:symbol-files:delete

Parameters​

NameTypeDescription
config.appId*requiredstringThe UUID of the application the mapping file belongs to.
config.bundleName*requiredstringThe name of the bundle.
config.bundleVersion*requiredstringThe version of the bundle.
config.fileName*requiredstringThe name of the mapping file, e.g. "index.android.bundle" or "index.ios.bundle".
config.platform*required"ANDROID" | "IOS"The platform (operating system) the mapping file belongs to.

Returns​

Return typeStatus codeDescription
void200Success. File deleted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { mobileDeobfuscationAndSymbolicationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await mobileDeobfuscationAndSymbolicationClient.delete_1({
    appId: "...",
    bundleName: "...",
    platform: "ANDROID",
    fileName: "...",
    bundleVersion: "...",
  });

get​

mobileDeobfuscationAndSymbolicationClient.get(config): Promise<void>

Gets content of React Native mapping file, as a single zipped file | maturity=EARLY_ADOPTER

One of the following scopes is required:

  • environment-api:symbol-files:read
  • deobfuscation:symbol-files:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • deobfuscation:symbol-files:read

Parameters​

NameTypeDescription
config.appId*requiredstringThe UUID of the application the mapping file belongs to.
config.bundleName*requiredstringThe name of the bundle.
config.bundleVersion*requiredstringThe version of the bundle.
config.fileName*requiredstringThe name of the mapping file, e.g. "index.android.bundle" or "index.ios.bundle".
config.ifNoneMatchstringThe entity tags (comma separated) of mapping files that should not be returned even if they exist.
config.platform*required"ANDROID" | "IOS"The platform (operating system) the mapping file belongs to.

Returns​

Return typeStatus codeDescription
void200Success. Response body contains a newer file than defined in the If-None-Match header.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { mobileDeobfuscationAndSymbolicationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await mobileDeobfuscationAndSymbolicationClient.get({
    appId: "...",
    bundleName: "...",
    platform: "ANDROID",
    fileName: "...",
    bundleVersion: "...",
  });

list​

mobileDeobfuscationAndSymbolicationClient.list(config): Promise<ReactNativeMappingFileListDto>

Lists all React Native files | maturity=EARLY_ADOPTER

One of the following scopes is required:

  • environment-api:symbol-files:read
  • deobfuscation:symbol-files:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • deobfuscation:symbol-files:read

Parameters​

NameTypeDescription
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of React Native mapping files in a single response payload.

The maximal allowed page size is 100.

If not set, 20 is used.

Returns​

Return typeStatus codeDescription
ReactNativeMappingFileListDto200Success.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { mobileDeobfuscationAndSymbolicationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await mobileDeobfuscationAndSymbolicationClient.list();

list_1​

mobileDeobfuscationAndSymbolicationClient.list_1(config): Promise<ReactNativeMappingFileListDto>

Lists React Native files belonging to certain application | maturity=EARLY_ADOPTER

One of the following scopes is required:

  • environment-api:symbol-files:read
  • deobfuscation:symbol-files:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • deobfuscation:symbol-files:read

Parameters​

NameTypeDescription
config.appId*requiredstringThe UUID of the application the mapping file belongs to.
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of React Native mapping files in a single response payload.

The maximal allowed page size is 100.

If not set, 20 is used.

Returns​

Return typeStatus codeDescription
ReactNativeMappingFileListDto200Success.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { mobileDeobfuscationAndSymbolicationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await mobileDeobfuscationAndSymbolicationClient.list_1({
    appId: "...",
  });

put​

mobileDeobfuscationAndSymbolicationClient.put(config): Promise<void>

Adds new or updates existing React Native mapping file | maturity=EARLY_ADOPTER

Required scope: deobfuscation:symbol-files:write

Parameters​

NameTypeDescription
config.appId*requiredstringThe UUID of the application the mapping file belongs to.
config.body*requiredPutBody
config.bundleName*requiredstringThe name of the bundle.
config.bundleVersion*requiredstringThe version of the bundle.
config.fileName*requiredstringThe name of the mapping file, e.g. "index.android.bundle" or "index.ios.bundle".
config.platform*required"ANDROID" | "IOS"The platform (operating system) the mapping file belongs to.

Returns​

Return typeStatus codeDescription
void200Success. The file has been uploaded and stored. Existing file replaced.
void201Success. The file has been uploaded and stored.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { mobileDeobfuscationAndSymbolicationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await mobileDeobfuscationAndSymbolicationClient.put({
    appId: "...",
    bundleName: "...",
    platform: "ANDROID",
    fileName: "...",
    bundleVersion: "...",
    body: { file: "..." },
  });

putMetadata​

mobileDeobfuscationAndSymbolicationClient.putMetadata(config): Promise<ReactNativeMappingFileMetadataDto>

Updates metadata of the specified React Native mapping file | maturity=EARLY_ADOPTER

Required scope: deobfuscation:symbol-files:write

Parameters​

NameTypeDescription
config.appId*requiredstringThe UUID of the application the mapping file belongs to.
config.body*requiredReactNativeMappingFileMetadataUpdateDto
config.bundleName*requiredstringThe name of the bundle.
config.bundleVersion*requiredstringThe version of the bundle.
config.fileName*requiredstringThe name of the mapping file, e.g. "index.android.bundle" or "index.ios.bundle".
config.platform*required"ANDROID" | "IOS"The platform (operating system) the mapping file belongs to.

Returns​

Return typeStatus codeDescription
ReactNativeMappingFileMetadataDto200Success. Metadata updated.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { mobileDeobfuscationAndSymbolicationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await mobileDeobfuscationAndSymbolicationClient.putMetadata(
    {
      appId: "...",
      bundleName: "...",
      platform: "ANDROID",
      fileName: "...",
      bundleVersion: "...",
      body: {},
    },
  );

monitoredEntitiesClient​

import { monitoredEntitiesClient } from '@dynatrace-sdk/client-classic-environment-v2';

deleteSecurityContext​

⚠️ Deprecated

monitoredEntitiesClient.deleteSecurityContext(config): Promise<SecurityContextResultDto>

Deletes the security context for all entities matching the entity selector.

Required scope: settings:objects:write One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:write

Automatic management zone rules will apply again to entities without a security context.

Parameters​

NameTypeDescription
config.entitySelector*requiredstring

Defines the scope of the entities to set the security context for. Only entities that can have management zones are considered for this operation

You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of three days is used (now-3d).

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
SecurityContextResultDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await monitoredEntitiesClient.deleteSecurityContext({
    entitySelector: "...",
  });

getEntities​

monitoredEntitiesClient.getEntities(config): Promise<EntitiesList>

Gets the information about monitored entities

Required scope: environment-api:entities:read Required permission: environment:roles:viewer

Lists entities observed within the specified timeframe along with their properties.

When you query entities of the SERVICE_METHOD type, only the following requests are returned:

You can limit the output by using pagination:

  1. Specify the number of results per page in the pageSize query parameter.
  2. Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.

Parameters​

NameTypeDescription
config.entitySelectorstring

Defines the scope of the query. Only entities matching the specified criteria are included into response.

You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

The field is required when you're querying the first page of results.

config.fieldsstring

Defines the list of entity properties included in the response. The ID and the name of an entity are always included to the response.

To add properties, list them with leading plus +. You can specify several properties, separated by a comma (for example fields=+lastSeenTms,+properties.BITNESS).

Use the GET entity type request to fetch the list of properties available for your entity type. Fields from the properties object must be specified in the properties.FIELD format (for example, properties.BITNESS).

When requesting large amounts of relationship fields, throttling can apply.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of three days is used (now-3d).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of entities.

If not set, 50 is used.

config.sortstring

Defines the ordering of the entities returned.

This field is optional, each field has a sign prefix (+/-), which corresponds to sorting order ( + for ascending and - for descending). If no sign prefix is set, then default ascending sorting order will be applied.

Currently ordering is only available for the display name (for example sort=name or sort =+name for ascending, sort=-name for descending)

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
EntitiesList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await monitoredEntitiesClient.getEntities();

getEntity​

monitoredEntitiesClient.getEntity(config): Promise<Entity>

Gets the properties of the specified monitored entity

Required scope: environment-api:entities:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.entityId*requiredstringThe ID of the required entity.
config.fieldsstring

Defines the list of entity properties included in the response. The ID and the name of an entity are always included to the response.

To add properties, list them with leading plus +. You can specify several properties, separated by a comma (for example fields=+lastSeenTms,+properties.BITNESS).

Use the GET entity type request to fetch the list of properties available for your entity type. Fields from the properties object must be specified in the properties.FIELD format (for example, properties.BITNESS).

When requesting large amounts of relationship fields, throttling can apply.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of three days is used (now-3d).

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
Entity200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await monitoredEntitiesClient.getEntity({
  entityId: "...",
});

getEntityType​

monitoredEntitiesClient.getEntityType(config): Promise<EntityType>

Gets a list of properties for the specified entity type

Required scope: environment-api:entities:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.type*requiredstringThe required entity type.

Returns​

Return typeStatus codeDescription
EntityType200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await monitoredEntitiesClient.getEntityType({
  type: "...",
});

getEntityTypes​

monitoredEntitiesClient.getEntityTypes(config): Promise<EntityTypeList>

Gets a list of properties for all entity types

Required scope: environment-api:entities:read Required permission: environment:roles:viewer

You can limit the output by using pagination:

  1. Specify the number of results per page in the pageSize query parameter.
  2. Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.

Parameters​

NameTypeDescription
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of entity types in a single response payload.

The maximal allowed page size is 500.

If not set, 50 is used.

Returns​

Return typeStatus codeDescription
EntityTypeList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await monitoredEntitiesClient.getEntityTypes();

pushCustomDevice​

monitoredEntitiesClient.pushCustomDevice(config): Promise<void | CustomDeviceCreationResult>

Creates or updates a custom device

Required scope: environment-api:entities:write Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.body*requiredCustomDeviceCreation
config.uiBasedbooleanIf true, it will be handled as if it was created via UI. It will be refreshed automatically and won't age out.

Returns​

Return typeStatus codeDescription
CustomDeviceCreationResult201Success
void204Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await monitoredEntitiesClient.pushCustomDevice(
  { body: { customDeviceId: "...", displayName: "..." } },
);

setSecurityContext​

⚠️ Deprecated

monitoredEntitiesClient.setSecurityContext(config): Promise<SecurityContextResultDto>

Sets the given security context for all entities matching the entity selector.

Required scope: settings:objects:write One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:write

Matching entities will have a management zone assigned, if the given security context matches the name of an already existing management zone. This endpoint does not create a new management zone, if there is no management zone with the provided name. Automatic management zone rules will not apply to entities with a set security context. It will need to be removed, to have them apply again.

Parameters​

NameTypeDescription
config.body*requiredSecurityContextDtoImpl
config.entitySelector*requiredstring

Defines the scope of the entities to set the security context for. Only entities that can have management zones are considered for this operation

You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of three days is used (now-3d).

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
SecurityContextResultDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await monitoredEntitiesClient.setSecurityContext({
    entitySelector: "...",
    body: { securityContext: ["..."] },
  });

monitoredEntitiesCustomTagsClient​

import { monitoredEntitiesCustomTagsClient } from '@dynatrace-sdk/client-classic-environment-v2';

deleteTags​

monitoredEntitiesCustomTagsClient.deleteTags(config): Promise<DeletedEntityTags>

Deletes the specified tag from the specified entities

Required scope: environment-api:entities:write Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.deleteAllWithKeyboolean
  • If true, all tags with the specified key are deleted, regardless of the value.
  • If false, only tags with exact match of key and value are deleted.

If not set, false is used.

config.entitySelector*requiredstring

Specifies the entities where you want to delete tags.

You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of 24 hours is used (now-24h).

config.key*requiredstring

The key of the tag to be deleted.

If deleteAllWithKey is true, then all tags with this key are deleted. Otherwise, only tags with exact match of key and value are deleted.

For value-only tags, specify the value here.

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

config.valuestring

The value of the tag to be deleted. The value is ignored if deleteAllWithKey is true.

For value-only tags, specify the value in the key parameter.

Returns​

Return typeStatus codeDescription
DeletedEntityTags200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesCustomTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await monitoredEntitiesCustomTagsClient.deleteTags({
    key: "...",
    entitySelector: "...",
  });

getTags​

monitoredEntitiesCustomTagsClient.getTags(config): Promise<CustomEntityTags>

Gets a list of custom tags applied to the specified entities

Required scope: environment-api:entities:read Required permission: environment:roles:viewer

Automatically applied tags and imported tags are not included.

Parameters​

NameTypeDescription
config.entitySelector*requiredstring

Specifies the entities where you want to read tags.

You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of 24 hours is used (now-24h).

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
CustomEntityTags200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesCustomTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await monitoredEntitiesCustomTagsClient.getTags({
    entitySelector: "...",
  });

postTags​

monitoredEntitiesCustomTagsClient.postTags(config): Promise<AddedEntityTags>

Adds custom tags to the specified entities

Required scope: environment-api:entities:write Required permission: environment:roles:manage-settings

All existing tags remain unaffected.

Parameters​

NameTypeDescription
config.body*requiredAddEntityTags
config.entitySelector*requiredstring

Specifies the entities where you want to update tags.

You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of 24 hours is used (now-24h).

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
AddedEntityTags200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { monitoredEntitiesCustomTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await monitoredEntitiesCustomTagsClient.postTags({
    entitySelector: "...",
    body: { tags: [{ key: "..." }] },
  });

monitoredEntitiesMonitoringStateClient​

import { monitoredEntitiesMonitoringStateClient } from '@dynatrace-sdk/client-classic-environment-v2';

getStates​

monitoredEntitiesMonitoringStateClient.getStates(config): Promise<MonitoredStates>

Lists monitoring states of entities

Required scope: environment-api:entities:read Required permission: environment:roles:viewer

Only process group instances are supported.

Parameters​

NameTypeDescription
config.entitySelectorstring

Specifies the process group instances where you're querying the state. Use the PROCESS_GROUP_INSTANCE entity type.

You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of 24 hours is used (now-24h).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of monitoring states in a single response payload.

The maximal allowed page size is 500.

If not set, 500 is used.

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
MonitoredStates200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorUnavailable | Client side error. | Server side error.

Code example

import { monitoredEntitiesMonitoringStateClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await monitoredEntitiesMonitoringStateClient.getStates();

networkZonesClient​

import { networkZonesClient } from '@dynatrace-sdk/client-classic-environment-v2';

createOrUpdateNetworkZone​

⚠️ Deprecated

networkZonesClient.createOrUpdateNetworkZone(config): Promise<void | EntityShortRepresentation>

Updates an existing network zone or creates a new one

One of the following scopes is required:

  • environment-api:network-zones:write
  • fleet-management:network-zones:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:network-zones:write

If the network zone with the specified ID does not exist, a new network zone is created.

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

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint POST /api/v2/settings/objects with schema builtin:networkzones.zones to create or update a network zone.

Parameters​

NameTypeDescription
config.body*requiredNetworkZone
config.id*requiredstring

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.

Returns​

Return typeStatus codeDescription
EntityShortRepresentation201Success. The new network zone has been created. The response body contains the ID of the new network zone.
void204Success. The network zone has been updated. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await networkZonesClient.createOrUpdateNetworkZone({
    id: "...",
    body: {},
  });

deleteNetworkZone​

⚠️ Deprecated

networkZonesClient.deleteNetworkZone(config): Promise<void>

Deletes the specified network zone

One of the following scopes is required:

  • environment-api:network-zones:write
  • fleet-management:network-zones:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:network-zones:write

You can only delete an empty network zone (a zone that no ActiveGate or OneAgent is using).

If the network zone is used as an alternative zone for any OneAgent, it will be automatically removed from the list of possible alternatives.

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint DELETE /api/v2/settings/objects/{objectId} to delete a network zone.

Parameters​

NameTypeDescription
config.id*requiredstringThe ID of the network zone to be deleted.

Returns​

Return typeStatus codeDescription
void204Deleted. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. See error message in the response body for details. | Client side error. | Server side error.

Code example

import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await networkZonesClient.deleteNetworkZone({
  id: "...",
});

getAllNetworkZones​

⚠️ Deprecated

networkZonesClient.getAllNetworkZones(config): Promise<NetworkZoneList>

Lists all existing network zones

One of the following scopes is required:

  • environment-api:network-zones:read
  • fleet-management:network-zones:read

One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:network-zones:read

Lists all existing network zones

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint /api/v2/settings/objects with schema builtin:networkzones.zones to list network zones.

Returns​

Return typeStatus codeDescription
NetworkZoneList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await networkZonesClient.getAllNetworkZones();

getHostStats​

networkZonesClient.getHostStats(config): Promise<NetworkZoneConnectionStatistics>

Gets the statistics about hosts using the network zone

One of the following scopes is required:

  • environment-api:network-zones:read
  • fleet-management:network-zones:read

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:network-zones:read

Gets the statistics about hosts using the network zone

Parameters​

NameTypeDescription
config.filter"all" | "configuredButNotConnectedOnly" | "connectedAsAlternativeOnly" | "connectedAsFailoverOnly" | "connectedAsFailoverWithoutOwnActiveGatesOnly"

Filters the resulting set of hosts:

  • all: All hosts using the zone.
  • configuredButNotConnectedOnly: Hosts from the network zone that use other zones.
  • connectedAsAlternativeOnly: Hosts that use the network zone as an alternative.
  • connectedAsFailoverOnly: Hosts from other zones that use the zone (not configured as an alternative) even though ActiveGates of higher priority are available.
  • connectedAsFailoverWithoutOwnActiveGatesOnly: Hosts from other zones that use the zone (not configured as an alternative) and no ActiveGates of higher priority are available.

If not set, all is used.

config.id*requiredstringThe ID of the required network zone.

Returns​

Return typeStatus codeDescription
NetworkZoneConnectionStatistics200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await networkZonesClient.getHostStats({
  id: "...",
});

getNetworkZoneSettings​

networkZonesClient.getNetworkZoneSettings(config): Promise<NetworkZoneSettings>

Gets the global configuration of network zones

One of the following scopes is required:

  • environment-api:network-zones:read
  • fleet-management:network-zones:read

One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:network-zones:read

Returns​

Return typeStatus codeDescription
NetworkZoneSettings200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await networkZonesClient.getNetworkZoneSettings();

getSingleNetworkZone​

⚠️ Deprecated

networkZonesClient.getSingleNetworkZone(config): Promise<NetworkZone>

Gets parameters of the specified network zone

One of the following scopes is required:

  • environment-api:network-zones:read
  • fleet-management:network-zones:read

One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:network-zones:read

Gets parameters of the specified network zone

Deprecation notice: This endpoint is deprecated. Use the Settings API endpoint /api/v2/settings/objects with schema builtin:networkzones.zones and filter by value.id to query a specific network zone.

Parameters​

NameTypeDescription
config.id*requiredstringThe ID of the required network zone.

Returns​

Return typeStatus codeDescription
NetworkZone200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await networkZonesClient.getSingleNetworkZone({
  id: "...",
});

updateNetworkZoneSettings​

networkZonesClient.updateNetworkZoneSettings(config): Promise<void>

Updates the global configuration of network zones

One of the following scopes is required:

  • environment-api:network-zones:write
  • fleet-management:network-zones:write

One of the following permissions is required:

  • environment:roles:manage-settings
  • fleet-management:network-zones:write

Parameters​

NameType
config.body*requiredNetworkZoneSettings

Returns​

Return typeStatus codeDescription
void204Success. The global network zones configuration has been updated. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await networkZonesClient.updateNetworkZoneSettings({
    body: {},
  });

oneAgentRemoteConfigurationManagementClient​

import { oneAgentRemoteConfigurationManagementClient } from '@dynatrace-sdk/client-classic-environment-v2';

createRemoteIdentityOperationPreview_1​

oneAgentRemoteConfigurationManagementClient.createRemoteIdentityOperationPreview_1(config): Promise<RemoteConfigurationManagementPreviewList>

Creates a preview for remote configuration management job - applicable only to network zone and host group

Required scope: fleet-management:oneagents:write One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:oneagents:write

Parameters​

Returns​

Return typeStatus codeDescription
RemoteConfigurationManagementPreviewList200Success

Throws​

Error TypeError Message
RemoteConfigurationManagementValidationResultErrorFailed. The input is invalid.
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { oneAgentRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await oneAgentRemoteConfigurationManagementClient.createRemoteIdentityOperationPreview_1(
    {
      body: {
        entities: [
          "HOST-D454A967666E7970,HOST-811760CFF2A5E872",
        ],
        operations: [
          { attribute: "networkZone", operation: "set" },
        ],
      },
    },
  );

getCurrentRemoteIdentityOperationJob_1​

oneAgentRemoteConfigurationManagementClient.getCurrentRemoteIdentityOperationJob_1(config): Promise<void | RemoteConfigurationManagementJob>

Gets remote configuration management job that is currently running

Required scope: fleet-management:oneagents:read One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:oneagents:read

The currently running remote configuration management job may be related to ActiveGates or OneAgents. There is a limit of one concurrent remote configuration management job, regardless of the entity type.

Returns​

Return typeStatus codeDescription
RemoteConfigurationManagementJob200Success
void204No remote configuration management job is currently running

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { oneAgentRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await oneAgentRemoteConfigurationManagementClient.getCurrentRemoteIdentityOperationJob_1();

getRemoteIdentityOperationJob_1​

oneAgentRemoteConfigurationManagementClient.getRemoteIdentityOperationJob_1(config): Promise<RemoteConfigurationManagementJob>

Gets the specified remote configuration management job

Required scope: fleet-management:oneagents:read One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:oneagents:read

Parameters​

NameTypeDescription
config.id*requiredstringThe ID of the required remote configuration management job.

Returns​

Return typeStatus codeDescription
RemoteConfigurationManagementJob200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { oneAgentRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await oneAgentRemoteConfigurationManagementClient.getRemoteIdentityOperationJob_1(
    { id: "..." },
  );

validateRemoteIdentityOperation_1​

oneAgentRemoteConfigurationManagementClient.validateRemoteIdentityOperation_1(config): Promise<void>

Validates the payload for the POST /oneagents/remoteConfigurationManagement request.

Required scope: fleet-management:oneagents:write One of the following permissions is required:

  • environment:roles:viewer
  • fleet-management:oneagents:write

Parameters​

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
RemoteConfigurationManagementValidationResultErrorFailed. The input is invalid.
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { oneAgentRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await oneAgentRemoteConfigurationManagementClient.validateRemoteIdentityOperation_1(
    {
      body: {
        entities: [
          "HOST-D454A967666E7970,HOST-811760CFF2A5E872",
        ],
        operations: [
          { attribute: "networkZone", operation: "set" },
        ],
      },
    },
  );

problemsClient​

import { problemsClient } from '@dynatrace-sdk/client-classic-environment-v2';

closeProblem​

problemsClient.closeProblem(config): Promise<void | ProblemCloseResult>

Closes the specified problem and adds a closing comment on it

One of the following scopes is required:

  • openpipeline:events.davis:ingest
  • environment-api:problems:write

One of the following permissions is required:

  • environment:roles:viewer
  • openpipeline:events.davis:ingest

Parameters​

NameTypeDescription
config.body*requiredProblemCloseRequestDtoImpl
config.problemId*requiredstringThe ID of the required problem.

Returns​

Return typeStatus codeDescription
ProblemCloseResult200Success
void204The problem is closed already the request hasn't been executed.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await problemsClient.closeProblem({
  problemId: "...",
  body: { message: "..." },
});

createComment​

problemsClient.createComment(config): Promise<void>

Adds a new comment on the specified problem

Required scope: environment-api:problems:write Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.body*requiredCommentRequestDtoImpl
config.problemId*requiredstringThe ID of the required problem.

Returns​

Return typeStatus codeDescription
void201Success. The comment has been added.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await problemsClient.createComment({
  problemId: "...",
  body: { message: "..." },
});

deleteComment​

problemsClient.deleteComment(config): Promise<void>

Deletes the specified comment from a problem

Required scope: environment-api:problems:write Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.commentId*requiredstringThe ID of the required comment.
config.problemId*requiredstringThe ID of the required problem.

Returns​

Return typeStatus codeDescription
void204Success. The comment has been deleted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await problemsClient.deleteComment({
  problemId: "...",
  commentId: "...",
});

getComment​

problemsClient.getComment(config): Promise<Comment>

Gets the specified comment on a problem

Required scope: environment-api:problems:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.commentId*requiredstringThe ID of the required comment.
config.problemId*requiredstringThe ID of the required problem.

Returns​

Return typeStatus codeDescription
Comment200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await problemsClient.getComment({
  problemId: "...",
  commentId: "...",
});

getComments​

problemsClient.getComments(config): Promise<CommentsList>

Gets all comments on the specified problem

Required scope: environment-api:problems:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters except the optional fields parameter.

config.pageSizenumber

The amount of comments in a single response payload.

The maximal allowed page size is 500.

If not set, 10 is used.

config.problemId*requiredstringThe ID of the required problem.

Returns​

Return typeStatus codeDescription
CommentsList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await problemsClient.getComments({
  problemId: "...",
});

getProblem​

problemsClient.getProblem(config): Promise<Problem>

Gets the properties of the specified problem

Required scope: environment-api:problems:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.fieldsstring

A list of additional problem properties you can add to the response.

The following properties are available (all other properties are always included and you can't remove them from the response):

  • evidenceDetails: The details of the root cause.
  • impactAnalysis: The impact analysis of the problem on other entities/users.
  • recentComments: A list of the most recent comments to the problem.

To add properties, specify them as a comma-separated list (for example, evidenceDetails,impactAnalysis).

config.problemId*requiredstringThe ID of the required problem.

Returns​

Return typeStatus codeDescription
Problem200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await problemsClient.getProblem({
  problemId: "...",
});

getProblems​

problemsClient.getProblems(config): Promise<Problems>

Lists problems observed within the specified timeframe

Required scope: environment-api:problems:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.entitySelectorstring

The entity scope of the query. You must set one of these criteria:

  • Entity type: type("TYPE")
  • Dynatrace entity ID: entityId("id"). You can specify several IDs, separated by a comma (entityId("id-1","id-2")). All requested entities must be of the same type.

You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Tag: tag("value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. Any colons (:) that are part of the key or value must be escaped with a backslash(\). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive.
  • Management zone ID: mzId(123)
  • Management zone name: mzName("value")
  • Entity name:
    • entityName.equals: performs a non-casesensitive EQUALS query.
    • entityName.startsWith: changes the operator to BEGINS WITH.
    • entityName.in: enables you to provide multiple values. The EQUALS operator applies.
    • caseSensitive(entityName.equals("value")): takes any entity name criterion as an argument and makes the value case-sensitive.
  • Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY")
  • First seen timestamp: firstSeenTms.<operator>(now-3h). Use any timestamp format from the from /to parameters. The following operators are available:
    • lte: earlier than or at the specified time
    • lt: earlier than the specified time
    • gte: later than or at the specified time
    • gt: later than the specified time
  • Entity attribute: <attribute>("value1","value2") and <attribute>.exists(). To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response.
  • Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>(). This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.
  • Negation: not(<criterion>). Inverts any criterion except for type.

For more information, see Entity selector in Dynatrace Documentation.

To set several criteria, separate them with a comma (,). For example, type("HOST"),healthState("HEALTHY"). Only results matching all criteria are included in the response.

The maximum string length is 2,000 characters.

The maximum number of entities that may be selected is limited to 10000.

config.fieldsstring

A list of additional problem properties you can add to the response.

The following properties are available (all other properties are always included and you can't remove them from the response):

  • evidenceDetails: The details of the root cause.
  • impactAnalysis: The impact analysis of the problem on other entities/users.
  • recentComments: A list of the most recent comments to the problem.

To add properties, specify them as a comma-separated list (for example, evidenceDetails,impactAnalysis).

The field is valid only for the current page of results. You must set it for each page you're requesting.

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two hours is used (now-2h).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters except the optional fields parameter.

config.pageSizenumber

The amount of problems in a single response payload.

The maximal allowed page size is 500.

If not set, 50 is used.

config.problemSelectorstring

Defines the scope of the query. Only problems matching the specified criteria are included into response.

You can add one or several of the criteria listed below. For each criterion you can specify multiple comma-separated values, unless stated otherwise. If several values are specified, the OR logic applies. All values must be quoted.

  • Status: status("open") or status("closed"). You can specify only one status.
  • Severity level: severityLevel("level-1","level-2"). Find the possible values in the description of the severityLevel field of the response.
  • Impact level: impactLevel("level-11","level-2") Find the possible values in the description of the impactLevel field of the response.
  • Root cause entity: rootCauseEntity("id-1", "id-2").
  • Management zone ID: managementZoneIds("mZId-1", "mzId-2").
  • Management zone name (contains, case-insensitive): managementZones("value-1","value-2").
  • Impacted entities: impactedEntities("id-1", "id-2").
  • Affected entities: affectedEntities("id-1", "id-2").
  • Type of affected entities: affectedEntityTypes("value-1","value-2").
  • Problem ID: problemId("id-1", "id-2").
  • Alerting profile ID: problemFilterIds("id-1", "id-2").
  • Alerting profile name (contains, case-insensitive): problemFilterNames("value-1","value-2").
  • Alerting profile name (exact match, case-insensitive): problemFilterNames.equals("value-1","value-2").
  • Entity tags: entityTags("[context]key:value","key:value"). Tags in [context]key:value, key:value, and value formats are detected and parsed automatically. If a value-only tag has a colon (:) in it, you must escape the colon with a backslash(\). Otherwise, the tag will be parsed as a key:value tag. All tag values are case-sensitive.
  • Display ID of the problem: displayId("id-1", "id-2").
  • Under maintenance: underMaintenance(true|false). Shows (true) or hides (false) all problems created during maintenance mode.
  • Text search: text("value"). Text search on the following fields: problem title, event titles, displayId and the id of affected and impacted entities. The text search is case insensitive, partial matching and based on a relevance score. Therefore the relevance sort option should be used to get the most relevant problems first. The special characters \~ and " need to be escaped using a \~ (e.g. double quote search text("\~"")). The search value is limited to 30 characters.

To set several criteria, separate them with a comma (,). Only results matching all criteria are included in the response.

config.sortstring

Specifies a set of comma-separated (,) fields for sorting in the problem list.

You can sort by the following properties with a sign prefix for the sorting order.

  • status: problem status (+ open problems first or - closed problems first)
  • startTime: problem start time (+ old problems first or - new problems first)
  • relevance: problem relevance (+ least relevant problems first or - most relevant problems first) - can be used only in combination with text search

If no prefix is set, + is used.

You can specify several levels of sorting. For example, +status,-startTime sorts problems by status, open problems first. Within the status, problems are sorted by start time, oldest first.

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
Problems200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await problemsClient.getProblems();

updateComment​

problemsClient.updateComment(config): Promise<void>

Updates the specified comment on a problem

Required scope: environment-api:problems:write Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.body*requiredCommentRequestDtoImpl
config.commentId*requiredstringThe ID of the required comment.
config.problemId*requiredstringThe ID of the required problem.

Returns​

Return typeStatus codeDescription
void204Success. The comment has been updated.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await problemsClient.updateComment({
  problemId: "...",
  commentId: "...",
  body: { message: "..." },
});

releasesClient​

import { releasesClient } from '@dynatrace-sdk/client-classic-environment-v2';

getReleases​

releasesClient.getReleases(config): Promise<Releases>

Returns all releases

Required scope: environment-api:releases:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.demobooleanGet your Releases (false) or a set of demo Releases (true).

Default: false
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of Releases in a single response payload.

The maximal allowed page size is 1000.

If not set, 100 is used.

config.releasesSelectorstring

Defines the scope of the query. Only Releases matching the provided criteria are included in the response.

You can add one or several of the criteria listed below.

  • Management zone: type(PROCESS_GROUP_INSTANCE),mzName("ManagementZone-A"). Filters for all releases in the given management zone. The filter is case-sensitive.
  • Monitoring state: monitoringState("Active") or monitoringState("Inactive"). You can specify only one monitoring state.
  • Health state: healthState("HEALTHY") or healthState("UNHEALTHY"). You can specify only one health state.
  • Security vulnerability: affectedBySecurityProblem("Detected") or affectedBySecurityProblem("Not detected"). You can specify only one security vulnerability state.
  • Name: entityName("name"). Filters for all releases that contain the given value in their name. The filter is case-insensitive.
  • Entity ID: entityId("id").
  • Product: releasesProduct("product"). Filters for all releases that contain the given value in their product. The filter is case-insensitive.
  • Stage: releasesStage("stage"). Filters for all releases that contain the given value in their stage. The filter is case-insensitive.
  • Version: releasesVersion("version"). Filters for all releases that contain the given value in their version. The filter is case-insensitive.

To set several criteria, separate them with comma (,). Only results matching all criteria are included in the response. e.g., .../api/v2/releases?releasesSelector=name("Server"),monitoringState("Active"),healthState("HEALTHY"),releasesVersion("1.0.7").

The special characters ~ and " need to be escaped using a ~ (e.g. double quote search entityName("~"").

config.sortstring

Specifies the field that is used for sorting the releases list. The field has a sign prefix (+/-) which corresponds to the sorting order ('+' for ascending and '-' for descending). If no sign prefix is set, then the default ascending sorting order will be applied. You can sort by the following properties:

  • 'product': Product name
  • 'name': Release name
  • 'stage': Stage name
  • 'version': Version
  • 'instances': Instances
  • 'traffic': Traffic

If not set, the ascending order sorting for name is applied.



Default: name
config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
Releases200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { releasesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await releasesClient.getReleases();

rumManualInsertionTagsClient​

import { rumManualInsertionTagsClient } from '@dynatrace-sdk/client-classic-environment-v2';

getInlineCode​

rumManualInsertionTagsClient.getInlineCode(config): Promise<string>

Download the inline code

Required scope: environment-api:rum:read Required permission: environment:roles:manage-settings

Returns the inline code, which embeds the full RUM monitoring code and configuration directly into the page, minimizing additional web requests. It needs to be updated after configuration changes and monitoring code updates.

Parameters​

NameTypeDescription
config.applicationId*requiredstringThe ID of the web application.

Returns​

Return typeStatus codeDescription
void200Success. The response contains the inline code.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { rumManualInsertionTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await rumManualInsertionTagsClient.getInlineCode({
    applicationId: "...",
  });

getJavaScriptTag​

rumManualInsertionTagsClient.getJavaScriptTag(config): Promise<string>

Download the JavaScript tag

Required scope: environment-api:rum:read Required permission: environment:roles:manage-settings

Returns the JavaScript tag, which references an external file containing monitoring code and configuration. Due to its dynamic update mechanism, it is recommended for most use cases.

Parameters​

NameTypeDescription
config.applicationId*requiredstringThe ID of the web application.
config.crossOriginAnonymousbooleanIndicates whether to add the crossorigin="anonymous" attribute to the tag. If specified, this overrides the configured value.
config.scriptExecutionAttribute"NONE" | "ASYNC" | "DEFER"Specifies the script execution attribute: async, defer, or none. If specified, this overrides the configured value.

Returns​

Return typeStatus codeDescription
void200Success. The response contains the JavaScript Tag.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { rumManualInsertionTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await rumManualInsertionTagsClient.getJavaScriptTag({
    applicationId: "...",
  });

getOneAgentJavaScriptTag​

rumManualInsertionTagsClient.getOneAgentJavaScriptTag(config): Promise<string>

Download the OneAgent JavaScript tag

Required scope: environment-api:rum:read Required permission: environment:roles:manage-settings

Returns the OneAgent JavaScript tag, which includes configuration and a reference to an external file containing the monitoring code. It needs to be updated after configuration changes and monitoring code updates.

Parameters​

NameTypeDescription
config.applicationId*requiredstringThe ID of the web application.
config.scriptExecutionAttribute"NONE" | "ASYNC" | "DEFER"Specifies the script execution attribute: async, defer, or none. If specified, this overrides the configured value.

Returns​

Return typeStatus codeDescription
void200Success. The response contains the OneAgent JavaScript Tag.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { rumManualInsertionTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await rumManualInsertionTagsClient.getOneAgentJavaScriptTag(
    { applicationId: "..." },
  );

getOneAgentJavaScriptTagWithSri​

rumManualInsertionTagsClient.getOneAgentJavaScriptTagWithSri(config): Promise<string>

Download the OneAgent JavaScript tag with SRI

Required scope: environment-api:rum:read Required permission: environment:roles:manage-settings

Returns the OneAgent JavaScript tag with SRI. It includes configuration, a reference to an external file containing the monitoring code, and a hash that allows the browser to verify the integrity of the monitoring code before executing it using its Subresource Integrity (SRI) feature. It needs to be updated after configuration changes and monitoring code updates.

Parameters​

NameTypeDescription
config.applicationId*requiredstringThe ID of the web application.
config.scriptExecutionAttribute"NONE" | "ASYNC" | "DEFER"Specifies the script execution attribute: async, defer, or none. If specified, this overrides the configured value.

Returns​

Return typeStatus codeDescription
void200Success. The response contains the OneAgent JavaScript Tag with SRI.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { rumManualInsertionTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await rumManualInsertionTagsClient.getOneAgentJavaScriptTagWithSri(
    { applicationId: "..." },
  );

securityProblemsClient​

import { securityProblemsClient } from '@dynatrace-sdk/client-classic-environment-v2';

bulkMuteRemediationItems​

securityProblemsClient.bulkMuteRemediationItems(config): Promise<RemediationItemsBulkMuteResponse>

Mutes several remediation items

Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems

Parameters​

NameTypeDescription
config.body*requiredRemediationItemsBulkMute
config.id*requiredstringThe ID of the requested third-party security problem.

Returns​

Return typeStatus codeDescription
RemediationItemsBulkMuteResponse200Success. The remediation item(s) have been muted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.bulkMuteRemediationItems({
    id: "...",
    body: {
      reason: "CONFIGURATION_NOT_AFFECTED",
      remediationItemIds: ["..."],
    },
  });

bulkMuteSecurityProblems​

securityProblemsClient.bulkMuteSecurityProblems(config): Promise<SecurityProblemsBulkMuteResponse>

Mutes several security problems

Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems

Parameters​

NameType
config.body*requiredSecurityProblemsBulkMute

Returns​

Return typeStatus codeDescription
SecurityProblemsBulkMuteResponse200Success. The security problem(s) have been muted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.bulkMuteSecurityProblems({
    body: {
      reason: "CONFIGURATION_NOT_AFFECTED",
      securityProblemIds: ["..."],
    },
  });

bulkUnmuteRemediationItems​

securityProblemsClient.bulkUnmuteRemediationItems(config): Promise<RemediationItemsBulkUnmuteResponse>

Un-mutes several remediation items

Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems

Parameters​

NameTypeDescription
config.body*requiredRemediationItemsBulkUnmute
config.id*requiredstringThe ID of the requested third-party security problem.

Returns​

Return typeStatus codeDescription
RemediationItemsBulkUnmuteResponse200Success. The remediation item(s) have been un-muted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.bulkUnmuteRemediationItems({
    id: "...",
    body: {
      reason: "AFFECTED",
      remediationItemIds: ["..."],
    },
  });

bulkUnmuteSecurityProblems​

securityProblemsClient.bulkUnmuteSecurityProblems(config): Promise<SecurityProblemsBulkUnmuteResponse>

Un-mutes several security problems

Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems

Parameters​

NameType
config.body*requiredSecurityProblemsBulkUnmute

Returns​

Return typeStatus codeDescription
SecurityProblemsBulkUnmuteResponse200Success. The security problem(s) have been un-muted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.bulkUnmuteSecurityProblems({
    body: {
      reason: "AFFECTED",
      securityProblemIds: ["..."],
    },
  });

getEventsForSecurityProblem​

securityProblemsClient.getEventsForSecurityProblem(config): Promise<SecurityProblemEventsList>

Lists all events of a security problem

Required scope: environment-api:security-problems:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

Parameters​

NameTypeDescription
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of thirty days is used (now-30d).

config.id*requiredstringThe ID of the requested security problem.
config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
SecurityProblemEventsList200Success. The response contains the list of security problem events.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.getEventsForSecurityProblem({
    id: "...",
  });

getRemediationItem​

securityProblemsClient.getRemediationItem(config): Promise<RemediationDetailsItem>

Gets parameters of a remediation item of a security problem

Required scope: environment-api:security-problems:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

Parameters​

NameTypeDescription
config.id*requiredstringThe ID of the requested third-party security problem.
config.remediationItemId*requiredstringThe ID of the remediation item.

Returns​

Return typeStatus codeDescription
RemediationDetailsItem200Success. The response contains details of a single remediation item of a security problem.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.getRemediationItem({
    id: "...",
    remediationItemId: "...",
  });

getRemediationItems​

securityProblemsClient.getRemediationItems(config): Promise<RemediationItemList>

Lists remediation items of a third-party security problem

Required scope: environment-api:security-problems:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

Parameters​

NameTypeDescription
config.id*requiredstringThe ID of the requested third-party security problem.
config.remediationItemSelectorstring

Defines the scope of the query. Only remediable entities matching the specified criteria are included in the response.

You can add one or more of the following criteria. Values are not case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Vulnerability state: vulnerabilityState("value"). Possible values are VULNERABLE, and RESOLVED. If not set, all entities are returned.
  • Muted: muted("value"). Possible values are TRUE or FALSE.
  • Reachable data asset assessment: assessment.dataAssets("value") Possible values are REACHABLE, and NOT_DETECTED.
  • Network exposure assessment: assessment.exposure("value") Possible values are PUBLIC_NETWORK, and NOT_DETECTED.
  • Vulnerable function usage assessment: assessment.vulnerableFunctionUsage("value") Possible values are IN_USE, and NOT_IN_USE.
  • Vulnerable function restart required: assessment.vulnerableFunctionRestartRequired("value") Possible values are TRUE or FALSE.
  • Vulnerable function in use contains: assessment.vulnerableFunctionInUseContains("value"). Possible values are class::function, class:: and function. The CONTAINS operator is used. Only vulnerable functions in use are considered.
  • Assessment accuracy: assessment.accuracy("value") Possible values are FULL and REDUCED.
  • Entity name contains: entityNameContains("value-1"). The CONTAINS operator is used.
  • Tracking link display name: trackingLink.displayNameContains("value"). The CONTAINS operator is used.

To set several criteria, separate them with a comma (,). Only results matching all criteria are included in the response.

Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (~) inside quotes:

  • Tilde ~
  • Quote "

Returns​

Return typeStatus codeDescription
RemediationItemList200Success. The response contains the list of remediation items of a problem.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.getRemediationItems({
    id: "...",
  });

getRemediationProgressEntities​

securityProblemsClient.getRemediationProgressEntities(config): Promise<RemediationProgressEntityList>

Lists remediation progress entities

Required scope: environment-api:security-problems:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

Parameters​

NameTypeDescription
config.id*requiredstringThe ID of the requested third-party security problem.
config.remediationItemId*requiredstringThe ID of the remediation item.
config.remediationProgressEntitySelectorstring

Defines the scope of the query. Only remediation progress entities matching the specified criteria are included in the response.

You can add one or more of the following criteria. Values are not case-sensitive and the EQUALS operator is used unless otherwise specified.

  • State: state("value"). Possible values the state field are AFFECTED and UNAFFECTED. If not set, all entities are returned.
  • Vulnerable function usage assessment: assessment.vulnerableFunctionUsage("value") Possible values are IN_USE, and NOT_IN_USE.
  • Vulnerable function restart required: assessment.vulnerableFunctionRestartRequired("value") Possible values are TRUE or FALSE.
  • Vulnerable function in use contains: assessment.vulnerableFunctionInUseContains("value"). Possible values are class::function, class:: and function. The CONTAINS operator is used. Only vulnerable functions in use are considered.
  • Entity name contains: entityNameContains("value-1"). The CONTAINS operator is used.

To set several criteria, separate them with a comma (,). Only results matching all criteria are included in the response.

Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (~) inside quotes:

  • Tilde ~
  • Quote "

Returns​

Return typeStatus codeDescription
RemediationProgressEntityList200Success. The response contains a list of remediation progress entities of a remediation item of a security problem. The number of entities returned is limited.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.getRemediationProgressEntities(
    { id: "...", remediationItemId: "..." },
  );

getSecurityProblem​

securityProblemsClient.getSecurityProblem(config): Promise<SecurityProblemDetails>

Gets parameters of a security problem

Required scope: environment-api:security-problems:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

Parameters​

NameTypeDescription
config.fieldsstring

A list of additional security problem properties you can add to the response.

The following properties are available (all other properties are always included and you can't remove them from the response):

  • riskAssessment: A risk assessment of the security problem.
  • managementZones: The management zone where the security problem occurred.
  • codeLevelVulnerabilityDetails: Details of the code-level vulnerability.
  • globalCounts: Globally calculated statistics about the security problem. No management zone information is taken into account.
  • filteredCounts: Statistics about the security problem, filtered by the management zone and timeframe start ('from') query parameters.
  • description: The description of the vulnerability.
  • remediationDescription: Description of how to remediate the vulnerability.
  • events: The security problem's last 10 events within the last 365 days, sorted from newest to oldest.
  • vulnerableComponents: A list of vulnerable components of the security problem within the provided filter range.
  • affectedEntities: A list of affected entities of the security problem within the provided filter range.
  • exposedEntities: A list of exposed entities of the security problem within the provided filter range.
  • reachableDataAssets: A list of data assets reachable by affected entities of the security problem within the provided filter range.
  • relatedEntities: A list of related entities of the security problem within the provided filter range.
  • relatedContainerImages: A list of related container images of the security problem within the provided filter range.
  • relatedAttacks: A list of attacks detected on the exposed security problem.
  • entryPoints: A list of entry points and a flag which indicates whether this list was truncated or not.

To add properties, specify them in a comma-separated list and prefix each property with a plus (for example, +riskAssessment,+managementZones).

config.fromstring

Based on the timeframe start the affected-, related- and vulnerable entities are being calculated. You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the default timeframe start of 24 hours in the past is used (now-24h).

The timeframe start must not be older than 365 days.

config.id*requiredstringThe ID of the requested security problem.
config.managementZoneFilterstring

To specify management zones, use one of the options listed below. For each option you can specify multiple comma-separated values. If several values are specified, the OR logic applies. All values are case-sensitive and must be quoted.

  • Management zone ID: ids("mzId-1", "mzId-2").
  • Management zone names: names("mz-1", "mz-2").

You can specify several comma-separated criteria (for example, names("myMz"),ids("9130632296508575249")).

Returns​

Return typeStatus codeDescription
SecurityProblemDetails200Success. The response contains parameters of the security problem.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.getSecurityProblem({
    id: "...",
  });

getSecurityProblems​

securityProblemsClient.getSecurityProblems(config): Promise<SecurityProblemList>

Lists all security problems

Required scope: environment-api:security-problems:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

Parameters​

NameTypeDescription
config.fieldsstring

A list of additional security problem properties you can add to the response.

The following properties are available (all other properties are always included and you can't remove them from the response):

  • riskAssessment: A risk assessment of the security problem.
  • managementZones: The management zone where the security problem occurred.
  • codeLevelVulnerabilityDetails: Details of the code-level vulnerability.
  • globalCounts: Globally calculated statistics about the security problem. No management zone information is taken into account.

To add properties, specify them in a comma-separated list and prefix each property with a plus (for example, +riskAssessment,+managementZones).

config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of thirty days is used (now-30d).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of security problems in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

config.securityProblemSelectorstring

Defines the scope of the query. Only security problems matching the specified criteria are included in the response.

You can add one or more of the following criteria. Values are not case-sensitive and the EQUALS operator is used unless otherwise specified.

  • Status: status("value"). Find the possible values in the description of the status field of the response. If not set, all security problems are returned.
  • Muted: muted("value"). Possible values are TRUE or FALSE.
  • Risk level: riskLevel("value"). The Davis risk level. Find the possible values in the description of the riskLevel field of the response.
  • Minimum risk score: minRiskScore("5.5"). The Davis minimum risk score. The GREATER THAN OR EQUAL TO operator is used. Specify a number between 1.0 and 10.0.
  • Maximum risk score: maxRiskScore("5.5"). The Davis maximum risk score. The LESS THAN operator is used. Specify a number between 1.0 and 10.0.
  • Base risk level: baseRiskLevel("value"). The Base risk level from the CVSS. Find the possible values in the description of the riskLevel field of the response.
  • Minimum base risk score: minBaseRiskScore("5.5"). The minimum base risk score from the CVSS. The GREATER THAN OR EQUAL TO operator is used. Specify a number between 1.0 and 10.0.
  • Maximum base risk score: maxBaseRiskScore("5.5"). The maximum base risk score from the CVSS. The LESS THAN operator is used. Specify a number between 1.0 and 10.0.
  • External vulnerability ID contains: externalVulnerabilityIdContains("id-1"). The CONTAINS operator is used. Maximum value length is 48 characters.
  • External vulnerability ID: externalVulnerabilityId("id-1", "id-2").
  • CVE ID: cveId("id").
  • Risk assessment riskAssessment("value-1", "value-2") Possible values are EXPOSED, SENSITIVE, EXPLOIT, VULNERABLE_FUNCTION_IN_USE and ACCURACY_REDUCED.
  • Related host ID: relatedHostIds("value-1", "value-2"). Specify Dynatrace entity IDs here.
  • Related host name: relatedHostNames("value-1", "value-2"). Values are case-sensitive.
  • Related host name contains: relatedHostNameContains("value-1"). The CONTAINS operator is used.
  • Related Kubernetes cluster ID: relatedKubernetesClusterIds("value-1", "value-2"). Specify Dynatrace entity IDs here.
  • Related Kubernetes cluster name: relatedKubernetesClusterNames("value-1", "value-2"). Values are case-sensitive.
  • Related Kubernetes cluster name contains: relatedKubernetesClusterNameContains("value-1"). The CONTAINS operator is used.
  • Related Kubernetes workload ID: relatedKubernetesWorkloadIds("value-1", "value-2"). Specify Dynatrace entity IDs here.
  • Related Kubernetes workload name: relatedKubernetesWorkloadNames("value-1", "value-2"). Values are case-sensitive.
  • Related Kubernetes workload name contains: relatedKubernetesWorkloadNameContains("value-1"). The CONTAINS operator is used.
  • Management zone ID: managementZoneIds("mzId-1", "mzId-2").
  • Management zone name: managementZones("name-1", "name-2"). Values are case-sensitive.
  • Affected process group instance ID: affectedPgiIds("pgiId-1", "pgiId-2"). Specify Dynatrace entity IDs here.
  • Affected process group ID: affectedPgIds("pgId-1", "pgId-2"). Specify Dynatrace entity IDs here.
  • Affected process group name: affectedPgNames("name-1", "name-2"). Values are case-sensitive.
  • Affected process group name contains: affectedPgNameContains("name-1"). The CONTAINS operator is used.
  • Vulnerable component ID: vulnerableComponentIds("componentId-1", "componentId-2"). Specify component IDs here.
  • Vulnerable component name: vulnerableComponentNames("name-1", "name-2"). Values are case-sensitive.
  • Vulnerable component name contains: vulnerableComponentNameContains("name-1"). The CONTAINS operator is used.
  • Host tags: hostTags("hostTag-1"). The CONTAINS operator is used. Maximum value length is 48 characters.
  • Process group tags: pgTags("pgTag-1"). The CONTAINS operator is used. Maximum value length is 48 characters.
  • Process group instance tags: pgiTags("pgiTag-1"). The CONTAINS operator is used. Maximum value length is 48 characters.
  • Tags: tags("tag-1"). The CONTAINS operator is used. This selector picks hosts, process groups, and process group instances at the same time. Maximum value length is 48 characters.
  • Display ID: displayIds("S-1234", "S-5678"). The EQUALS operator is used.
  • Security problem ID: securityProblemIds("12544152654387159360", "5904857564184044850"). The EQUALS operator is used.
  • Technology: technology("technology-1", "technology-2"). Find the possible values in the description of the technology field of the response. The EQUALS operator is used.
  • Vulnerability type: vulnerabilityType("type-1", "type-2"). Possible values are THIRD_PARTY, CODE_LEVEL, RUNTIME.

Risk score and risk category are mutually exclusive (cannot be used at the same time).

To set several criteria, separate them with a comma (,). Only results matching all criteria are included in the response.

Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (~) inside quotes:

  • Tilde ~
  • Quote "
config.sortstring

Specifies one or more fields for sorting the security problem list. Multiple fields can be concatenated using a comma (,) as a separator (e.g. +status,-timestamp).

You can sort by the following properties with a sign prefix for the sorting order.

  • status: The security problem status (+ open first or - resolved first)
  • muted: The security problem mute state (+ unmuted first or - muted first)
  • technology: The security problem technology
  • firstSeenTimestamp: The timestamp of the first occurrence of the security problem (+ new problems first or - old problems first)
  • lastUpdatedTimestamp: The timestamp of the last update of the security problem (+ recently updated problems first or - earlier updated problems first)
  • securityProblemId: The auto-generated ID of the security problem (+ lower number first or - higher number first)
  • externalVulnerabilityId: The ID of the external vulnerability (+ lower number first or - higher number first)
  • displayId: The display ID (+ lower number first or - higher number first)
  • riskAssessment.riskScore: Davis Security Score (+ lower score first or - higher score first)
  • riskAssessment.riskLevel: Davis Security Score level (+ lower level first or - higher level first)
  • riskAssessment.exposure: Whether the problem is exposed to the internet
  • riskAssessment.baseRiskScore: The CVSS score (+ lower score first or - higher score first)
  • riskAssessment.baseRiskLevel: The CVSS level (+ lower level first or - higher level first)
  • riskAssessment.dataAssets: Whether data assets are affected
  • riskAssessment.vulnerableFunctionUsage: Whether vulnerable functions are used
  • riskAssessment.assessmentAccuracy: The assessments accuracy (+ less accuracy first or - more accuracy first)
  • globalCounts.affectedNodes: Number of affected nodes (+ lower number first or - higher number first)
  • globalCounts.affectedProcessGroupInstances: Number of affected process group instances (+ lower number first or - higher number first)
  • globalCounts.affectedProcessGroups: Number of affected process groups (+ lower number first or - higher number first)
  • globalCounts.exposedProcessGroups: Number of exposed process groups (+ lower number first or - higher number first)
  • globalCounts.reachableDataAssets: Number of reachable data assets (+ lower number first or - higher number first)
  • globalCounts.relatedApplications: Number of related applications (+ lower number first or - higher number first)
  • globalCounts.relatedAttacks: Number of attacks on the security problem (+ lower number first or - higher number first)
  • globalCounts.relatedHosts: Number of related hosts (+ lower number first or - higher number first)
  • globalCounts.relatedKubernetesClusters: Number of related Kubernetes cluster (+ lower number first or - higher number first)
  • globalCounts.relatedKubernetesWorkloads: Number of related Kubernetes workloads (+ lower number first or - higher number first)
  • globalCounts.relatedServices: Number of related services (+ lower number first or - higher number first)
  • globalCounts.vulnerableComponents: Number of vulnerable components (+ lower number first or - higher number first)

If no prefix is set, + is used.

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

The end of the timeframe must not be older than 365 days.

Returns​

Return typeStatus codeDescription
SecurityProblemList200Success. The response contains the list of security problems.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.getSecurityProblems();

getVulnerableFunctions​

securityProblemsClient.getVulnerableFunctions(config): Promise<VulnerableFunctionsContainer>

Lists all vulnerable functions and their usage for a third-party security problem

Required scope: environment-api:security-problems:read One of the following permissions is required:

  • environment:roles:manage-security-problems
  • environment:roles:view-security-problems

Parameters​

NameTypeDescription
config.groupBystring

Defines additional grouping types in which vulnerable functions should be displayed.

You can add one of the following grouping types.

  • Process group: PROCESS_GROUP
config.id*requiredstringThe ID of the requested third-party security problem.
config.vulnerableFunctionsSelectorstring

Defines the scope of the query. Only vulnerable functions matching the specified criteria are included in the response.

You can add the following criteria. Values are not case sensitive and the EQUALS operator is used unless otherwise specified.

  • Management zone ID: managementZoneIds("mzId-1", "mzId-2").
  • Management zone name: managementZones("name-1", "name-2"). Values are case sensitive.
  • Process group ID: processGroupIds("pgId-1", "pgId-2"). Specify Dynatrace entity IDs here.
  • Process group name: processGroupNames("name-1", "name-2"). Values are case sensitive.
  • Process group name contains: processGroupNameContains("name-1"). The CONTAINS operator is used.

Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (~) inside quotes:

  • Tilde ~
  • Quote "

Returns​

Return typeStatus codeDescription
VulnerableFunctionsContainer200Success. The response contains the list of vulnerable functions.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.getVulnerableFunctions({
    id: "...",
  });

muteSecurityProblem​

securityProblemsClient.muteSecurityProblem(config): Promise<void>

Mutes a security problem

Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems

Parameters​

NameTypeDescription
config.body*requiredSecurityProblemMute
config.id*requiredstringThe ID of the requested security problem.

Returns​

Return typeStatus codeDescription
void200Success. The security problem has been muted.
void204Not executed. The security problem is already muted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.muteSecurityProblem({
    id: "...",
    body: { reason: "CONFIGURATION_NOT_AFFECTED" },
  });

setRemediationItemMuteState​

securityProblemsClient.setRemediationItemMuteState(config): Promise<void>

Sets the mute state of a remediation item

Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems

Parameters​

NameTypeDescription
config.body*requiredRemediationItemMuteStateChange
config.id*requiredstringThe ID of the requested third-party security problem.
config.remediationItemId*requiredstringThe ID of the remediation item.

Returns​

Return typeStatus codeDescription
void200Success. The requested mute state has been applied to the remediation item.
void204Not executed. The remediation item was previously put into the requested mute state by the same user with the same reason and comment.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.setRemediationItemMuteState({
    id: "...",
    remediationItemId: "...",
    body: {
      comment: "...",
      muted: false,
      reason: "IGNORE",
    },
  });

trackingLinkBulkUpdateAndDelete​

securityProblemsClient.trackingLinkBulkUpdateAndDelete(config): Promise<void>

Updates the external tracking links of the remediation items. | maturity=EARLY_ADOPTER

Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems

Parameters​

NameTypeDescription
config.body*requiredRemediationItemsBulkUpdateDeleteDto
config.id*requiredstringThe ID of the requested third-party security problem.

Returns​

Return typeStatus codeDescription
void204Success. The requested tracking links have been updated.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.trackingLinkBulkUpdateAndDelete(
    { id: "...", body: {} },
  );

unmuteSecurityProblem​

securityProblemsClient.unmuteSecurityProblem(config): Promise<void>

Un-mutes a security problem

Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems

Parameters​

NameTypeDescription
config.body*requiredSecurityProblemUnmute
config.id*requiredstringThe ID of the requested security problem.

Returns​

Return typeStatus codeDescription
void200Success. The security problem has been un-muted.
void204Not executed. The security problem is already un-muted.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await securityProblemsClient.unmuteSecurityProblem({
    id: "...",
    body: { reason: "AFFECTED" },
  });

serviceLevelObjectivesClient​

import { serviceLevelObjectivesClient } from '@dynatrace-sdk/client-classic-environment-v2';

createAlert​

serviceLevelObjectivesClient.createAlert(config): Promise<EntityShortRepresentation>

Creates an alert of the provided alert type for an SLO

Required scope: environment-api:slo:write One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:write

Parameters​

NameTypeDescription
config.body*requiredAbstractSloAlertDto
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

config.id*requiredstringThe ID of the required SLO.
config.timeFrame"CURRENT" | "GTF"

The timeframe to calculate the SLO values:

  • CURRENT: SLO's own timeframe.
  • GTF: timeframe specified by from and to parameters.

If not set, the CURRENT value is used.

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
EntityShortRepresentation201Success. The new alert has been created. The response contains the parameters of the new alert. The location response header contains the ID of the new alert.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Precondition for creating an SLO alert not fulfilled. The SLO func metric cannot be created or is not created by the SLO. | Internal server error. | Client side error. | Server side error.

Code example

import { serviceLevelObjectivesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await serviceLevelObjectivesClient.createAlert(
  {
    id: "...",
    body: {
      alertName: "...",
      alertThreshold: 10,
      alertType: "BURN_RATE",
    },
  },
);

createSlo​

serviceLevelObjectivesClient.createSlo(config): Promise<void>

Creates a new SLO

Required scope: environment-api:slo:write One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:write

Parameters​

NameType
config.body*requiredSloConfigItemDtoImpl

Returns​

Return typeStatus codeDescription
void201Success. The new SLO has been created. Response doesn't have a body. The location response header contains the ID of the new SLO.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. Conflicting resource. | Internal server error. | Client side error. | Server side error.

Code example

import { serviceLevelObjectivesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await serviceLevelObjectivesClient.createSlo({
  body: {
    evaluationType: "AGGREGATE",
    name: "Payment service availability",
    target: 95,
    timeframe: "-1d",
    warning: 97.5,
  },
});

deleteSlo​

serviceLevelObjectivesClient.deleteSlo(config): Promise<void>

Deletes an SLO

Required scope: environment-api:slo:write One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:write

Parameters​

NameType
config.id*requiredstring

Returns​

Return typeStatus codeDescription
void204Success. The SLO has been deleted. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The requested resource doesn't exist. | Failed. Conflicting resource. | Internal server error. | Client side error. | Server side error.

Code example

import { serviceLevelObjectivesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await serviceLevelObjectivesClient.deleteSlo({
  id: "...",
});

getSlo​

serviceLevelObjectivesClient.getSlo(config): Promise<SLOs>

Lists all available SLOs along with calculated values

Required scope: environment-api:slo:read One of the following permissions is required:

  • environment:roles:viewer
  • settings:objects:read

By default the values are calculated for the SLO's own timeframe. You can use a custom timeframe:

  1. Set the timeFrame parameter to GTF.
  2. Provide the timeframe in from and to parameters.

Parameters​

NameTypeDescription
config.demobooleanGet your SLOs (false) or a set of demo SLOs (true).

Default: false
config.enabledSlos"false" | "true" | "all"Get your enabled SLOs (true), disabled ones (false) or both enabled and disabled ones (all).
config.evaluate"false" | "true"Get your SLOs without them being evaluated (false) or with evaluations (true) with maximum pageSize of 25.
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of SLOs in a single response payload.

The maximal allowed page size is 10000.

If not set, 10 is used.

config.showGlobalSlosbooleanGet your global SLOs (true) regardless of the selected filter or filter them out (false).

Default: true
config.sloSelectorstring

The scope of the query. Only SLOs matching the provided criteria are included in the response.

You can add one or several of the criteria listed below.

  • SLO ID: id("id-1","id-2").
  • Name: name("name"). Filters for an SLO with the given name. The filter is case-sensitive.
  • Health state: healthState("HEALTHY") or healthState("UNHEALTHY"). Filters for SLOs that have no related open problems (HEALTHY) or SLOs that have related open problems (UNHEALTHY). You can specify only one health state.
  • Text: text("value"). Filters for all SLOs that contain the given value in their name or description. The filter is case-insensitive.
  • Problem: problemDisplayName("value"). Filters for all SLOs that are related to a given problem display name (e.g. P-12345).
  • Management zone name: managementZone("MZ-A"). Filters for all SLOs that are related to the given management zone name. Returned SLOs are evaluated against the given management zone.
  • Management zone ID: managementZoneID("123"). Filters for all SLOs that are related to the given management zone ID. Returned SLOs are evaluated against the given management zone.

To set several criteria, separate them with comma (,). Only SLOs matching all criteria are included in the response. Examples:

  • .../api/v2/slo?sloSelector=name("Service Availability")
  • .../api/v2/slo?sloSelector=id("id")
  • .../api/v2/slo?sloSelector=text("Description"),healthState("HEALTHY").

The special characters ~ and " need to be escaped using a ~ (e.g. double quote search text("~"")).

config.sortstring

The sorting of SLO entries:

  • name: Names in ascending order.
  • -name: Names in descending order.

If not set, the ascending order is used.



Default: name
config.timeFrame"CURRENT" | "GTF"

The timeframe to calculate the SLO values:

  • CURRENT: SLO's own timeframe.
  • GTF: timeframe specified by from and to parameters.

If not set, the CURRENT value is used.

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
SLOs200Success. The response contains the parameters and calculated values of the requested SLO.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { serviceLevelObjectivesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await serviceLevelObjectivesClient.getSlo();

getSloById​

serviceLevelObjectivesClient.getSloById(config): Promise<SLO>

Gets parameters and calculated values of a specific SLO

Required scope: environment-api:slo:read One of the following permissions is required:

  • environment:roles:viewer
  • settings:objects:read

If from and to parameters are provided, the SLO is calculated for that timeframe; otherwise the SLO's own timeframe is used.

Parameters​

NameTypeDescription
config.fromstring

The start of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the relative timeframe of two weeks is used (now-2w).

config.id*requiredstringThe ID of the required SLO.
config.timeFrame"CURRENT" | "GTF"

The timeframe to calculate the SLO values:

  • CURRENT: SLO's own timeframe.
  • GTF: timeframe specified by from and to parameters.

If not set, the CURRENT value is used.

config.tostring

The end of the requested timeframe.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

Returns​

Return typeStatus codeDescription
SLO200Success. The response contains the parameters and calculated values of the requested SLO.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. The requested resource doesn't exist. | Client side error. | Server side error.

Code example

import { serviceLevelObjectivesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await serviceLevelObjectivesClient.getSloById({
  id: "...",
});

updateSloById​

serviceLevelObjectivesClient.updateSloById(config): Promise<void>

Updates an existing SLO

Required scope: environment-api:slo:write One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:write

Parameters​

NameTypeDescription
config.body*requiredSloConfigItemDtoImpl
config.id*requiredstringThe ID of the required SLO.

Returns​

Return typeStatus codeDescription
void200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Internal server error. | Client side error. | Server side error.

Code example

import { serviceLevelObjectivesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await serviceLevelObjectivesClient.updateSloById({
    id: "...",
    body: {
      evaluationType: "AGGREGATE",
      name: "Payment service availability",
      target: 95,
      timeframe: "-1d",
      warning: 97.5,
    },
  });

settingsManagementZonesClient​

import { settingsManagementZonesClient } from '@dynatrace-sdk/client-classic-environment-v2';

getManagementZoneDetails​

settingsManagementZonesClient.getManagementZoneDetails(config): Promise<ManagementZoneDetails>

Reads management zone details.

Required scope: settings:objects:read One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:read

Allows to convert from an objectId to the ID of the management zone, and can serve as a replacement for the old config endpoint for that purpose.

Parameters​

NameTypeDescription
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
ManagementZoneDetails200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Forbidden. | No object available for the given objectId | Client side error. | Server side error.

Code example

import { settingsManagementZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsManagementZonesClient.getManagementZoneDetails(
    { objectId: "..." },
  );

settingsObjectsClient​

import { settingsObjectsClient } from '@dynatrace-sdk/client-classic-environment-v2';

addPermission​

settingsObjectsClient.addPermission(config): Promise<AccessorPermissions>

Add the permissions for a single accessor on this object.

Required scope: settings:objects:write

Add the permissions for a single accessor on this object, anyone with read/write permissions is allowed to add more permissions.

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.body*requiredAccessorPermissions
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
AccessorPermissions201Created

Throws​

Error TypeError Message
ErrorEnvelopeErrorIf accessor id already exists. | Failed. Forbidden. | No object available for the given objectId. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await settingsObjectsClient.addPermission({
  objectId: "...",
  body: { accessor: { type: "user" }, permissions: ["r"] },
});

deleteSettingsObjectByObjectId​

settingsObjectsClient.deleteSettingsObjectByObjectId(config): Promise<void>

Deletes the specified settings object

Required scope: settings:objects:write One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:write

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.objectId*requiredstringThe ID of the required settings object.
config.updateTokenstring

The update token of the object. You can use it to detect simultaneous modifications by different users.

It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.

If omitted on update/deletion, the operation overrides the current value or deletes it without any checks.

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
SettingsObjectResponseErrorFailed. Schema validation failed. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource.
ErrorEnvelopeErrorFailed. Forbidden. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.deleteSettingsObjectByObjectId(
    { objectId: "..." },
  );

getEffectiveSettingsValues​

settingsObjectsClient.getEffectiveSettingsValues(config): Promise<EffectiveSettingsValuesList>

Lists effective settings values

Required scope: settings:objects:read One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:read

Lists effective settings values for selected schemas at a selected scope (or entity). This operation evaluates the hierarchy of persisted objects (see /settings/objects)

It will always return a result for a schema/scope combination, even if the schema would not be relevant to the given scope/entity.

If no object along the hierarchy is persisted, the default value as defined in the schema will be returned.

Deprecation notice: The ability to query values of any schema by leaving out the schemaIds parameter in the first-page query is deprecated and will eventually be removed.

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.fieldsstring

A list of fields to be included to the response. The provided set of fields replaces the default set.

Specify the required top-level fields, separated by commas (for example, origin,value).

Supported fields: summary, searchSummary, created, modified, createdBy, modifiedBy, author, origin, schemaId, schemaVersion, value, externalId.



Default: origin,value
config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of settings objects in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

config.schemaIdsstring

A list of comma-separated schema IDs to which the requested objects belong.

Only considered on load of the first page, when the nextPageKey is not set.

config.scopestring

The scope that the requested objects target.

The selection only matches objects directly targeting the specified scope. For example, environment will not match objects that target a host within environment. For more details, please see Dynatrace Documentation.

To load the first page, when the nextPageKey is not set, this parameter is required.

Returns​

Return typeStatus codeDescription
EffectiveSettingsValuesList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The specified schema or scope is not found. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.getEffectiveSettingsValues();

getPermission​

settingsObjectsClient.getPermission(config): Promise<AccessorPermissions>

Get current permissions of the accessor on this object.

Required scope: settings:objects:read

Get current permissions of the accessor on this object.

Parameters​

NameTypeDescription
config.accessorId*requiredstringThe user uuid or group uuid of the accessor, depending on the type.
config.accessorType*required"group" | "user"The type of the accessor.
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
AccessorPermissions200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorNo object available for the given objectId or the accessor doesn't have any permissions on this object. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await settingsObjectsClient.getPermission({
  objectId: "...",
  accessorType: "group",
  accessorId: "...",
});

getPermissionAllUsers​

settingsObjectsClient.getPermissionAllUsers(config): Promise<AccessorPermissions>

Get current permissions of the all-users accessor on this object.

Required scope: settings:objects:read

Get current permissions of the all-users accessor on this object.

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
AccessorPermissions200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorNo object available for the given objectId or the all-users accessor doesn't have any permissions on this object. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.getPermissionAllUsers({
    objectId: "...",
  });

getPermissions​

settingsObjectsClient.getPermissions(config): Promise<AccessorPermissionsList>

Get current permissions on this object.

Required scope: settings:objects:read

Get current permissions on this object.

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
AccessorPermissionsList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorNo object available for the given objectId. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await settingsObjectsClient.getPermissions({
  objectId: "...",
});

getSettingsHistory​

settingsObjectsClient.getSettingsHistory(config): Promise<RevisionDiffPage>

Gets the history of settings objects

Required scope: settings:objects:read One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:read

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.fieldsstringA list of fields to be included to the response.Specify the required top-level fields, separated by commas (for example, revision,modificationInfo). Supported fields: revision, jsonPatch, jsonBefore, jsonAfter, objectId, type, schemaId, schemaVersion, schemaDisplayName, modificationInfo, summary, source, appId, ownerBefore, ownerAfter.(optional, default to revision, modificationInfo)
config.filterstring

The filter parameter, as explained here. Filtering is supported on the following fields:

  • objectId
  • modificationInfo.lastModifiedTime

The fields can only be combined with and as a boolean operator. If this parameter is omitted only revisions of the last 2 weeks are returned. If modificationInfo.lastModifiedTime does not specify a full range, it will be completed with current time minus 1 year for the missing lower bound or the current time for the upper bound. (optional)

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of settings objects in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

config.schemaIdstring

Schema ID to which the requested revisions belong.

In the Dynatrace Platform, this parameter accepts multiple schema IDs separated with commas. In Dynatrace Managed and in SaaS Environments not connected to the Dynatrace Platform, this parameter accepts only a single schema ID, not multiple ones.

config.scopestring

The scope that the requested history objects target.

The selection only matches revisions directly targeting the specified scope. For example, environment will not match objects that target a host within environment. For more details, please see Dynatrace Documentation.

To load the first page, when the nextPageKey is not set, this parameter is required.

config.sortstring

The sort parameter, as explained here. Sorting is supported on the following fields:

  • modificationInfo.lastModifiedTime (optional, default to -modificationInfo.lastModifiedTime)

Returns​

Return typeStatus codeDescription
RevisionDiffPage200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. schemaId contains multiple schemaIds and request was for not for Dynatrace Platform. | Failed. Forbidden. | No object available for the given objectId | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.getSettingsHistory();

getSettingsObjectByObjectId​

settingsObjectsClient.getSettingsObjectByObjectId(config): Promise<SettingsObjectByObjectIdResponse>

Gets the specified settings object

Required scope: settings:objects:read One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:read

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
SettingsObjectByObjectIdResponse200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Forbidden. | No object available for the given objectId | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.getSettingsObjectByObjectId({
    objectId: "...",
  });

getSettingsObjects​

settingsObjectsClient.getSettingsObjects(config): Promise<ObjectsList>

Lists persisted settings objects

Required scope: settings:objects:read One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:read

Lists persisted settings objects for selected schemas at selected scopes (or entities).

If nothing is persisted or if all persisted settings objects are not accessible due to missing permissions, no items will be returned.

Deprecation notice: The ability to query values of any schema by leaving out the schemaIds parameter in the first-page query is deprecated and will eventually be removed.

To query the effective values (including schema defaults) please see /settings/effectiveValues.

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.externalIdsstring

A list of comma-separated external IDs that the requested objects have.

Each external ID has a maximum length of 500 characters.

Only considered on load of the first page, when the nextPageKey is not set.

config.fieldsstring

A list of fields to be included to the response. The provided set of fields replaces the default set.

Specify the required top-level fields, separated by commas (for example, objectId,value).

Supported fields: objectId, summary, searchSummary, created, modified, createdBy, modifiedBy, author, updateToken, scope, modificationInfo (deprecated), resourceContext, owner, schemaId, schemaVersion, value, externalId.



Default: objectId,value
config.filterstring

The filter parameter, as explained here.

Filtering is supported on the following fields:

  • created
  • modified
  • createdBy
  • modifiedBy
  • author (deprecated, will not work for future schemas)
  • value with properties and sub-properties separated by dot (for example, value.owningApp = 'Notebooks')

If this parameter is omitted, all settings objects will be returned. The maximum nesting depth (via parentheses) is 5. The maximum expression length is 1024 characters.

Note that only fields included to the response via fields can be used for filtering.

config.nextPageKeystring

The cursor for the next page of results. You can find it in the nextPageKey field of the previous response.

The first page is always returned if you don't specify the nextPageKey query parameter.

When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters.

config.pageSizenumber

The amount of settings objects in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

config.schemaIdsstring

A list of comma-separated schema IDs to which the requested objects belong.

To load the first page, when the nextPageKey is not set, either this parameter or scopes is required.

To load all objects belonging to the given schema IDs leave the scopes parameter empty.

config.scopesstring

A list of comma-separated scopes, that the requested objects target.

The selection only matches objects directly targeting the specified scopes. For example, environment will not match objects that target a host within environment. For more details, please see Dynatrace Documentation.

To load the first page, when the nextPageKey is not set, either this parameter or schemaIds is required.

To load all objects belonging to the given scopes leave the schemaIds parameter empty.

config.sortstring

The sort parameter, as explained here.

Sorting is supported on the following fields:

  • created
  • modified
  • createdBy
  • modifiedBy
  • author (deprecated, will not work for future schemas)
  • value with properties and sub-properties separated by dot (for example, value.owningApp)

Note that only fields included to the response via fields can be used for sorting.

Returns​

Return typeStatus codeDescription
ObjectsList200Success. Accessible objects returned.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Forbidden. | Failed. The specified schema or scope is not found. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.getSettingsObjects();

postSettingsObjects​

settingsObjectsClient.postSettingsObjects(config): Promise<Array<SettingsObjectResponse>>

Creates a new settings object

Required scope: settings:objects:write One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:write

You can upload several objects at once. In that case each object returns its own response code. Check the response body for details.

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.body*requiredArray<SettingsObjectCreate>
config.validateOnlybooleanIf true, the request runs only validation of the submitted settings objects, without saving them.

Default: false

Returns​

Return typeStatus codeDescription
SettingsObjectResponse200Success
SettingsObjectResponse207Multi-status: different objects in the payload resulted in different statuses.

Throws​

Error TypeError Message
SettingsObjectResponseArrayErrorFailed. Schema validation failed. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource.
ErrorEnvelopeErrorFailed. Forbidden. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.postSettingsObjects({
    body: [
      {
        schemaId:
          "builtin:container.built-in-monitoring-rule",
        scope: "HOST-D3A3C5A146830A79",
        value: {},
      },
    ],
  });

putSettingsObjectByObjectId​

settingsObjectsClient.putSettingsObjectByObjectId(config): Promise<SettingsObjectResponse>

Updates an existing settings object

Required scope: settings:objects:write One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:objects:write

To update a property of the secret type you need to pass the new value unmasked. To keep the current value, send the current masked secret. You can obtain it via GET an object endpoint.

Some schemas don't allow passing of the masked secret. In that case you need to send the unmasked secret with every update of the object.

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.body*requiredSettingsObjectUpdate
config.objectId*requiredstringThe ID of the required settings object.
config.validateOnlybooleanIf true, the request runs only validation of the submitted settings object, without saving it.

Default: false

Returns​

Return typeStatus codeDescription
SettingsObjectResponse200Success

Throws​

Error TypeError Message
SettingsObjectResponseErrorFailed. Schema validation failed. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource.
ErrorEnvelopeErrorFailed. Forbidden. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.putSettingsObjectByObjectId({
    objectId: "...",
    body: { value: {} },
  });

removePermission​

settingsObjectsClient.removePermission(config): Promise<void>

Remove the permissions for an existing accessor on this object.

Required scope: settings:objects:write

Remove the permissions for an existing accessor on this object, anyone with read/write permissions is allowed to delete permissions.

Parameters​

NameTypeDescription
config.accessorId*requiredstringThe user uuid or group uuid of the accessor, depending on the type.
config.accessorType*required"group" | "user"The type of the accessor.
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
void204Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorNo object available for the given objectId or the accessor doesn't have any permissions on this object. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await settingsObjectsClient.removePermission({
  objectId: "...",
  accessorType: "group",
  accessorId: "...",
});

removePermissionAllUsers​

settingsObjectsClient.removePermissionAllUsers(config): Promise<void>

Remove the permissions for an existing all-users accessor on this object.

Required scope: settings:objects:write

Remove the permissions for an existing all-users accessor on this object, anyone with read/write permissions is allowed to delete permissions.

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
void204Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorNo object available for the given objectId or the all-users accessor doesn't have any permissions on this object. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.removePermissionAllUsers({
    objectId: "...",
  });

resolveEffectivePermissions​

settingsObjectsClient.resolveEffectivePermissions(config): Promise<Array<EffectivePermission>>

Get the effective settings permissions of the calling user in the environment

One of the following scopes is required:

  • settings:objects:write
  • settings:objects:read
  • settings:schemas:read

One of the following permissions is required:

  • environment:roles:viewer
  • settings:schemas:read

Parameters​

NameType
config.body*requiredResolutionRequest

Returns​

Return typeStatus codeDescription
EffectivePermission200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Forbidden. No access to any settings. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.resolveEffectivePermissions({
    body: {
      permissions: [
        {
          context: {
            schemaId: "service:schema",
            scope: "environment",
          },
          permission: "settings:objects:write",
        },
      ],
    },
  });

transferOwnership​

settingsObjectsClient.transferOwnership(config): Promise<void>

Transfer ownership of the object.

Required scope: settings:objects:write

Transfer ownership of the object, only the owner or the main admin is allowed to transfer the ownership (IAM permission needed).

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.body*requiredTransferOwnershipRequest
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Failed. Forbidden. | No object available for the given objectId. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await settingsObjectsClient.transferOwnership({
  objectId: "...",
  body: { newOwner: { type: "user" } },
});

updatePermission​

settingsObjectsClient.updatePermission(config): Promise<void>

Update the permissions for an existing accessor on this object.

Required scope: settings:objects:write

Update the permissions for an existing accessor on this object, anyone with read/write permissions is allowed to update permissions.

Parameters​

NameTypeDescription
config.accessorId*requiredstringThe user uuid or group uuid of the accessor, depending on the type.
config.accessorType*required"group" | "user"The type of the accessor.
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.body*requiredUpdatePermissionsRequest
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
void200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorIf permission list is empty, contains unsupported entries or unsupported combinations of entries. | No object available for the given objectId or the accessor doesn't have any permissions on this object. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data = await settingsObjectsClient.updatePermission({
  objectId: "...",
  accessorType: "group",
  accessorId: "...",
  body: { permissions: ["r"] },
});

updatePermissionAllUsers​

settingsObjectsClient.updatePermissionAllUsers(config): Promise<void>

Update the permissions for an existing all-users accessor on this object.

Required scope: settings:objects:write

Update the permissions for an existing all-users accessor on this object, anyone with read/write permissions is allowed to update permissions.

Parameters​

NameTypeDescription
config.adminAccessbooleanIf set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects

Default: false
config.body*requiredUpdatePermissionsRequest
config.objectId*requiredstringThe ID of the required settings object.

Returns​

Return typeStatus codeDescription
void200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorIf permission list is empty, contains unsupported entries or unsupported combinations of entries. | No object available for the given objectId or the all-users accessor doesn't have any permissions on this object. | Client side error. | Server side error.

Code example

import { settingsObjectsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsObjectsClient.updatePermissionAllUsers({
    objectId: "...",
    body: { permissions: ["r"] },
  });

settingsSchemasClient​

import { settingsSchemasClient } from '@dynatrace-sdk/client-classic-environment-v2';

getAvailableSchemaDefinitions​

settingsSchemasClient.getAvailableSchemaDefinitions(config): Promise<SchemaList>

Lists available settings schemas

Required scope: settings:schemas:read One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:schemas:read

Parameters​

NameTypeDescription
config.fieldsstring

A list of fields to be included to the response. The provided set of fields replaces the default set.

Specify the required top-level fields, separated by commas (for example, schemaId,displayName).

Supported fields: schemaId, displayName, maturity, latestSchemaVersion, multiObject, ordered, ownerBasedAccessControl.



Default: schemaId,displayName,latestSchemaVersion

Returns​

Return typeStatus codeDescription
SchemaList200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { settingsSchemasClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsSchemasClient.getAvailableSchemaDefinitions();

getSchemaDefinition​

settingsSchemasClient.getSchemaDefinition(config): Promise<SchemaDefinitionRestDto>

Gets parameters of the specified settings schema

Required scope: settings:schemas:read One of the following permissions is required:

  • environment:roles:manage-settings
  • settings:schemas:read

Parameters​

NameTypeDescription
config.schemaId*requiredstringThe ID of the required schema.
config.schemaVersionstring

The version of the required schema.

If not set, the most recent version is returned.

Returns​

Return typeStatus codeDescription
SchemaDefinitionRestDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. Forbidden. | Failed. The specified schema doesn't exist. | Client side error. | Server side error.

Code example

import { settingsSchemasClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await settingsSchemasClient.getSchemaDefinition({
    schemaId: "...",
  });

syntheticHttpMonitorExecutionsClient​

import { syntheticHttpMonitorExecutionsClient } from '@dynatrace-sdk/client-classic-environment-v2';

getExecutionResult​

syntheticHttpMonitorExecutionsClient.getExecutionResult(config): Promise<MonitorExecutionResults>

Gets detailed information about the last execution of the specified HTTP monitor

Required scope: environment-api:synthetic-execution:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.locationIdstringFilters the results to those executed by specified Synthetic location. Specify the ID of the location.
config.monitorId*requiredstringIdentifier of the HTTP monitor for which last execution result is returned.
config.resultType*required"SUCCESS" | "FAILED"Defines the result type of the last HTTP monitor's execution.

Returns​

Return typeStatus codeDescription
MonitorExecutionResults200Success. The response contains detailed data.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticHttpMonitorExecutionsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticHttpMonitorExecutionsClient.getExecutionResult(
    { monitorId: "...", resultType: "SUCCESS" },
  );

syntheticLocationsNodesAndConfigurationClient​

import { syntheticLocationsNodesAndConfigurationClient } from '@dynatrace-sdk/client-classic-environment-v2';

addLocation​

syntheticLocationsNodesAndConfigurationClient.addLocation(config): Promise<SyntheticLocationIdsDto>

Creates a new private synthetic location

Required scope: environment-api:synthetic:write Required permission: environment:roles:manage-settings

Parameters​

NameType
config.body*requiredPrivateSyntheticLocation

Returns​

Return typeStatus codeDescription
SyntheticLocationIdsDto201Success. The private location has been created. The response contains the ID of the new location.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.addLocation(
    {
      body: {
        latitude: 10,
        longitude: 10,
        name: "...",
        type: "CLUSTER",
      },
    },
  );

getConfiguration​

syntheticLocationsNodesAndConfigurationClient.getConfiguration(config): Promise<SyntheticConfigDto>

Gets set of synthetic related parameters defined for whole tenant (affects all monitors and all private locations). | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Returns​

Return typeStatus codeDescription
SyntheticConfigDto200Success. The response contains synthetic related parameters defined for whole tenant.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getConfiguration();

getLocation​

syntheticLocationsNodesAndConfigurationClient.getLocation(config): Promise<PrivateSyntheticLocation | SyntheticLocation>

Gets properties of the specified location

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.locationId*requiredstringThe Dynatrace entity ID of the required location.

Returns​

Return typeStatus codeDescription
PrivateSyntheticLocation200Success. The response contains parameters of the synthetic location.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getLocation(
    { locationId: "..." },
  );

getLocationDeploymentApplyCommands​

syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentApplyCommands(config): Promise<string>

Gets list of commands to deploy synthetic location in Kubernetes/Openshift cluster

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.filenamestringFilename
config.fipsModestringFips mode, accepted values are: DISABLED, ENABLED, ENABLED_WITH_CORPORATE_PROXY. Default value is DISABLED.
config.namespacestringNamespace
config.platformstringContainer platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES.
config.squidProxyConfigstringOptional configuration for Squid corporate proxy. If not provided the default value will be used.

Returns​

Return typeStatus codeDescription
void200Success. The response contains the list of commands that needs to be executed to deploy a synthetic location.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentApplyCommands();

getLocationDeploymentDeleteCommands​

syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentDeleteCommands(config): Promise<string>

Gets list of commands to delete synthetic location in Kubernetes/Openshift cluster

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.filenamestringFilename
config.locationId*requiredstringThe Dynatrace entity ID of the required location.
config.namespacestringNamespace
config.platformstringContainer platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES.

Returns​

Return typeStatus codeDescription
void200Success. The response contains the list of commands that needs to be executed to delete a synthetic location.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentDeleteCommands(
    { locationId: "..." },
  );

getLocationDeploymentYaml​

syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentYaml(config): Promise<Binary>

Gets yaml file content to deploy location in Kubernetes/Openshift cluster

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.activeGateNamestringActive gate name
config.customRegistrystringCustom images registry prefix - this will replace 'dynatrace' in image URLs in generated yaml.
config.locationId*requiredstringThe Dynatrace entity ID of the required location.
config.namespacestringNamespace
config.tagVersionActiveGatestringCustom version tag for Active Gate - this will be used as desired Active Gate version in generated yaml.
config.tagVersionSyntheticstringCustom version tag for Synthetic- this will be used as desired Synthetic version in generated yaml

Returns​

Return typeStatus codeDescription
void200Success. The response contains the content of deployment yaml file.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentYaml(
    { locationId: "..." },
  );

getLocations​

syntheticLocationsNodesAndConfigurationClient.getLocations(config): Promise<SyntheticLocations>

Lists all synthetic locations (both public and private) available for your environment

Required scope: environment-api:synthetic:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.capability"BROWSER" | "HTTP" | "HTTP_HIGH_RESOURCE" | "ICMP" | "TCP" | "DNS"Filters the resulting set of locations to those which support specific capability.
config.cloudPlatform"AWS" | "AZURE" | "ALIBABA" | "GOOGLE_CLOUD" | "OTHER"Filters the resulting set of locations to those which are hosted on a specific cloud platform.
config.type"PUBLIC" | "PRIVATE"Filters the resulting set of locations to those of a specific type.

Returns​

Return typeStatus codeDescription
SyntheticLocations200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getLocations();

getLocationsStatus​

syntheticLocationsNodesAndConfigurationClient.getLocationsStatus(config): Promise<SyntheticPublicLocationsStatus>

Checks the status of public synthetic locations

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Returns​

Return typeStatus codeDescription
SyntheticPublicLocationsStatus200Success. The response contains the public locations status.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getLocationsStatus();

getMetricAdapterDeploymentApplyCommands​

syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentApplyCommands(config): Promise<string>

Gets list of commands to deploy metric adapter in Kubernetes/Openshift cluster | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.filenamestringFilename
config.namespacestringNamespace
config.platformstringContainer platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES.

Returns​

Return typeStatus codeDescription
void200Success. The response contains the list of commands that needs to be executed to deploy a metric adapter.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentApplyCommands();

getMetricAdapterDeploymentDeleteCommands​

syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentDeleteCommands(config): Promise<string>

Gets list of commands to delete metric adapter in Kubernetes/Openshift cluster | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.filenamestringFilename
config.platformstringContainer platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES.

Returns​

Return typeStatus codeDescription
void200Success. The response contains the list of commands that needs to be executed to delete a metric adapter.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentDeleteCommands();

getMetricAdapterDeploymentYaml​

syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentYaml(config): Promise<Binary>

Gets yaml file content to deploy metric adapter in Kubernetes/Openshift cluster | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.namespacestringNamespace
config.platformstringContainer platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES.

Returns​

Return typeStatus codeDescription
void200Success. The response contains the content of deployment yaml file.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentYaml();

getNode​

syntheticLocationsNodesAndConfigurationClient.getNode(config): Promise<Node>

Lists properties of the specified synthetic node

Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.nodeId*requiredstringThe ID of the required synthetic node.

Returns​

Return typeStatus codeDescription
Node200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getNode(
    { nodeId: "..." },
  );

getNodes​

syntheticLocationsNodesAndConfigurationClient.getNodes(config): Promise<Nodes>

Lists all synthetic nodes available in your environment

Required scope: environment-api:synthetic:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.assignedToLocation"TRUE" | "FALSE"Filters the resulting set of nodes to those which are assigned to a synthetic location or not.
config.isContainerizedbooleanIf set to true, returns only containerized nodes.

Returns​

Return typeStatus codeDescription
Nodes200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.getNodes();

removeLocation​

syntheticLocationsNodesAndConfigurationClient.removeLocation(config): Promise<void>

Deletes the specified private synthetic location

Required scope: environment-api:synthetic:write Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.locationId*requiredstringThe Dynatrace entity ID of the private synthetic location to be deleted.

Returns​

Return typeStatus codeDescription
void204Success. The location has been deleted. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.removeLocation(
    { locationId: "..." },
  );

updateConfiguration​

syntheticLocationsNodesAndConfigurationClient.updateConfiguration(config): Promise<void>

Updates set of synthetic related parameters defined for whole tenant (affects all monitors and all private locations). | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic:write Required permission: environment:roles:manage-settings

Parameters​

NameType
config.body*requiredSyntheticConfigDto

Returns​

Return typeStatus codeDescription
void204Success. The set of synthetic related parameters has been updated. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.updateConfiguration(
    {
      body: {
        bmMonitorTimeout: 10,
        bmStepTimeout: 10,
        maintenanceWindowsExcludedFromAvailability: false,
      },
    },
  );

updateLocation​

syntheticLocationsNodesAndConfigurationClient.updateLocation(config): Promise<void>

Updates the specified synthetic location

Required scope: environment-api:synthetic:write Required permission: environment:roles:manage-settings

For public locations you can only change the location status.

Parameters​

NameTypeDescription
config.body*requiredSyntheticLocationUpdate
config.locationId*requiredstringThe Dynatrace entity ID of the synthetic location to be updated.

Returns​

Return typeStatus codeDescription
void204Success. The location has been updated. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.updateLocation(
    { locationId: "...", body: { type: "PRIVATE" } },
  );

updateLocationsStatus​

syntheticLocationsNodesAndConfigurationClient.updateLocationsStatus(config): Promise<void>

Changes the status of public synthetic locations

Required scope: environment-api:synthetic:write Required permission: environment:roles:manage-settings

Parameters​

NameType
config.body*requiredSyntheticPublicLocationsStatus

Returns​

Return typeStatus codeDescription
void204Success. Locations status has been updated.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticLocationsNodesAndConfigurationClient.updateLocationsStatus(
    { body: { publicLocationsEnabled: false } },
  );

syntheticNetworkAvailabilityMonitorsClient​

import { syntheticNetworkAvailabilityMonitorsClient } from '@dynatrace-sdk/client-classic-environment-v2';

createMonitor​

syntheticNetworkAvailabilityMonitorsClient.createMonitor(config): Promise<MonitorEntityIdDto>

Creates a synthetic monitor definition. | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic-monitors:write Required permission: environment:roles:manage-settings

Parameters​

Returns​

Return typeStatus codeDescription
MonitorEntityIdDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticNetworkAvailabilityMonitorsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticNetworkAvailabilityMonitorsClient.createMonitor(
    {},
  );

deleteMonitor​

syntheticNetworkAvailabilityMonitorsClient.deleteMonitor(config): Promise<void>

Deletes a synthetic monitor definition for the given monitor ID. | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic-monitors:write Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.monitorId*requiredstringThe identifier of the monitor.

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticNetworkAvailabilityMonitorsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticNetworkAvailabilityMonitorsClient.deleteMonitor(
    { monitorId: "..." },
  );

getMonitor​

syntheticNetworkAvailabilityMonitorsClient.getMonitor(config): Promise<SyntheticBrowserMonitorResponse | SyntheticHttpMonitorResponse | SyntheticMultiProtocolMonitorResponse>

Gets a synthetic monitor definition for the given monitor ID. | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic-monitors:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.monitorId*requiredstringThe identifier of the monitor.

Returns​

Return typeStatus codeDescription
SyntheticHttpMonitorResponse200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticNetworkAvailabilityMonitorsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticNetworkAvailabilityMonitorsClient.getMonitor(
    { monitorId: "..." },
  );

getMonitors​

syntheticNetworkAvailabilityMonitorsClient.getMonitors(config): Promise<SyntheticMonitorListDto>

Gets all synthetic monitors. | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic-monitors:read Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.monitorSelectorstring

Defines the scope of the query. Only monitors matching the specified criteria are included into response.

You can add one or several of the criteria listed below. For each criterion you can specify multiple comma-separated values, unless stated otherwise. If several values are specified, the OR logic applies.

  • Monitor type: type(HTTP,MULTI_PROTOCOL). Possible values: 'HTTP', 'BROWSER', 'THIRD_PARTY', 'MULTI_PROTOCOL' (Note that only 'BROWSER' and 'MULTI_PROTOCOL' are currently supported).
  • Management zone ID: managementZoneId(1, 2).
  • Synthetic Location ME ID: location(SYNTHETIC_LOCATION-123).
  • Monitored host ME ID: monitoredEntity(HOST-123).
  • Monitor tags: tag([context]key:value,key:value,key). Tags in [context]key:value, key:value, and key formats are detected and parsed automatically. If a key-only tag has a colon (:) in it, you must escape the colon with a backslash(\). Otherwise, the tag will be parsed as a key:value tag. All tag values are case-sensitive. Values listed within a single tag(...) are combined with OR. To require multiple tags (AND), specify several tag(...) selectors. For example, tag(tag-a),tag(tag-b) matches only monitors that have both tags, while tag(tag-a,tag-b) matches monitors that have either.
  • Monitor enablement: enabled(true).
  • Monaco external ID: externalId(value1,value2)

To set several criteria, separate them with a comma (,). Only results matching all criteria are included in the response.

Returns​

Return typeStatus codeDescription
SyntheticMonitorListDto200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticNetworkAvailabilityMonitorsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticNetworkAvailabilityMonitorsClient.getMonitors();

updateMonitor​

syntheticNetworkAvailabilityMonitorsClient.updateMonitor(config): Promise<void>

Updates a synthetic monitor definition for the given monitor ID. | maturity=EARLY_ADOPTER

Required scope: environment-api:synthetic-monitors:write Required permission: environment:roles:manage-settings

Parameters​

NameTypeDescription
config.body*requiredSyntheticBrowserMonitorRequest | SyntheticHttpMonitorRequest | SyntheticMultiProtocolMonitorRequest
config.monitorId*requiredstringThe identifier of the monitor.

Returns​

Return typeStatus codeDescription
void204Success. Response doesn't have a body.

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { syntheticNetworkAvailabilityMonitorsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticNetworkAvailabilityMonitorsClient.updateMonitor(
    { monitorId: "..." },
  );

syntheticOnDemandMonitorExecutionsClient​

import { syntheticOnDemandMonitorExecutionsClient } from '@dynatrace-sdk/client-classic-environment-v2';

execute​

syntheticOnDemandMonitorExecutionsClient.execute(config): Promise<SyntheticOnDemandExecutionResult>

Triggers on-demand executions for synthetic monitors

Required scope: environment-api:synthetic-execution:write Required permission: environment:roles:viewer

Parameters​

NameType
config.body*requiredSyntheticOnDemandExecutionRequest

Returns​

Return typeStatus codeDescription
SyntheticOnDemandExecutionResult201Success. The monitor's execution response details

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Unavailable | Client side error. | Server side error.

Code example

import { syntheticOnDemandMonitorExecutionsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticOnDemandMonitorExecutionsClient.execute({
    body: {},
  });

getBatch​

syntheticOnDemandMonitorExecutionsClient.getBatch(config): Promise<SyntheticOnDemandBatchStatus>

Gets summary information and the list of failed executions for the given batch ID

Required scope: environment-api:synthetic-execution:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.batchId*requirednumberThe batch identifier of the executions.

Returns​

Return typeStatus codeDescription
SyntheticOnDemandBatchStatus200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Batch with the given ID doesn't exist. | Client side error. | Server side error.

Code example

import { syntheticOnDemandMonitorExecutionsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticOnDemandMonitorExecutionsClient.getBatch({
    batchId: 10,
  });

getExecution​

syntheticOnDemandMonitorExecutionsClient.getExecution(config): Promise<SyntheticOnDemandExecution>

Gets basic results of the specified on-demand execution

Required scope: environment-api:synthetic-execution:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.executionId*requirednumberThe identifier of the on-demand execution.

Returns​

Return typeStatus codeDescription
SyntheticOnDemandExecution200Success. The response contains basic information about the on-demand execution.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Execution with the given ID doesn't exist. | Client side error. | Server side error.

Code example

import { syntheticOnDemandMonitorExecutionsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticOnDemandMonitorExecutionsClient.getExecution(
    { executionId: 10 },
  );

getExecutionFullReport​

syntheticOnDemandMonitorExecutionsClient.getExecutionFullReport(config): Promise<SyntheticOnDemandExecution>

Gets detailed results of the specified on-demand execution

Required scope: environment-api:synthetic-execution:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.executionId*requirednumberThe identifier of the on-demand execution.

Returns​

Return typeStatus codeDescription
SyntheticOnDemandExecution200Success. The response contains detailed information about the on-demand execution.

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Execution with the given ID doesn't exist. | Client side error. | Server side error.

Code example

import { syntheticOnDemandMonitorExecutionsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticOnDemandMonitorExecutionsClient.getExecutionFullReport(
    { executionId: 10 },
  );

getExecutions​

syntheticOnDemandMonitorExecutionsClient.getExecutions(config): Promise<SyntheticOnDemandExecutions>

Gets the list of all on-demand executions of synthetic monitors

Required scope: environment-api:synthetic-execution:read Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.batchIdnumberFilters the resulting set of the executions by batch. Specify the ID of the batch.
config.dataDeliveryFromstring

The start of the requested timeframe for data delivering timestamps.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the maximum relative timeframe of six hours is used (now-6h).

config.dataDeliveryTostring

The end of the requested timeframe for data delivering timestamps.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

config.executionFromstring

The start of the requested timeframe for execution timestamps.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the maximum relative timeframe of six hours is used (now-6h).

config.executionStage"TRIGGERED" | "EXECUTED" | "DATA_RETRIEVED"Filters the resulting set of executions by their stage.
config.executionTostring

The end of the requested timeframe for execution timestamps.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

config.locationIdstringFilters the resulting set of the executions by Synthetic location. Specify the ID of the location.
config.monitorIdstringFilters the resulting set of the executions by monitor synthetic monitor. Specify the ID of the monitor.
config.schedulingFromstring

The start of the requested timeframe for scheduling timestamps.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the maximum relative timeframe of six hours is used (now-6h).

config.schedulingTostring

The end of the requested timeframe for scheduling timestamps.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the current timestamp is used.

config.source"API" | "UI"Filters the resulting set of the executions by the source of the triggering request.
config.userIdstringFilters the resulting set of executions by scheduled user.

Returns​

Return typeStatus codeDescription
SyntheticOnDemandExecutions200Success

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Client side error. | Server side error.

Code example

import { syntheticOnDemandMonitorExecutionsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticOnDemandMonitorExecutionsClient.getExecutions();

rerun​

syntheticOnDemandMonitorExecutionsClient.rerun(config): Promise<SyntheticOnDemandExecutionResult>

Reruns specified on-demand execution of synthetic monitors

Required scope: environment-api:synthetic-execution:write Required permission: environment:roles:viewer

Parameters​

NameTypeDescription
config.executionId*requirednumberThe identifier of the on-demand execution.

Returns​

Return typeStatus codeDescription
SyntheticOnDemandExecutionResult200Success. The monitor's execution response details

Throws​

Error TypeError Message
ErrorEnvelopeErrorFailed. The input is invalid. | Unavailable | Client side error. | Server side error.

Code example

import { syntheticOnDemandMonitorExecutionsClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await syntheticOnDemandMonitorExecutionsClient.rerun({
    executionId: 10,
  });
Still have questions?
Find answers in the Dynatrace Community