1.11.1 • Published 1 day ago

@dynatrace-sdk/client-classic-environment-v2 v1.11.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 day ago

@dynatrace-sdk/client-classic-environment-v2

npm License

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.

Installation

npm install @dynatrace-sdk/client-classic-environment-v2

Getting help

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.

API reference

Full API reference for the latest version of the SDK is also available at the Dynatrace Developer.

accessTokensActiveGateTokensClient

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

createToken

Creates a new ActiveGate token

One of the following scopes is required:

  • environment-api:activegate-tokens:create
  • environment-api:activegate-tokens:write

Required permission: environment:roles:manage-settings

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

Success. The token has been created. The body of the response contains the token secret.

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

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

getToken

Gets metadata of an ActiveGate token

Required scope: environment-api:activegate-tokens:read Required permission: environment:roles:manage-settings

The token secret is not exposed.

Parameters

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

Returns

Success. The response contains the metadata of the tokens.

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

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

listTokens

Lists all available ActiveGate tokens

Required scope: environment-api:activegate-tokens: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.nextPageKeystringThe 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 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

Success. The response contains the list of ActiveGate tokens.

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

const data =
  await accessTokensActiveGateTokensClient.listTokens();

revokeToken

Deletes an ActiveGate token

Required scope: environment-api:activegate-tokens:write Required permission: environment:roles:manage-settings

Parameters

NameTypeDescription
config.activeGateTokenIdentifier*requiredstringThe ActiveGate token identifier, consisting of prefix and public part of the token to be deleted.
import { accessTokensActiveGateTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

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

accessTokensApiTokensClient

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

createApiToken

Creates a new API token

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

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

Success. The token has been created. The body of the response contains the token secret.

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

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

deleteApiToken

Deletes an API token

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

Parameters

NameTypeDescription
config.id*requiredstringThe 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.
import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";

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

getApiToken

Gets API token metadata by token ID

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

The token secret is not exposed.

Parameters

NameType
config.id*requiredstring

Returns

Success

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

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

listApiTokens

Lists all available API tokens

Required scope: environment-api:api-tokens: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.apiTokenSelectorstringFilters 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.fieldsstringSpecifies 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.fromstringFilters 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.nextPageKeystringThe 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 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.sortstringThe 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.tostringFilters 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

Success

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

const data =
  await accessTokensApiTokensClient.listApiTokens();

lookupApiToken

Gets API token metadata by token secret

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

Parameters

NameType
config.body*requiredApiTokenSecret

Returns

Success

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

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

updateApiToken

Updates an API token

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

Parameters

NameTypeDescription
config.body*requiredApiTokenUpdate
config.id*requiredstringThe ID of the token to be updated. You can't disable the token you're using for authentication of the request.
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

Cancels tenant token rotation

Required scope: environment-api:tenant-token-rotation:write Required permission: environment:roles:manage-settings

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

Returns

Success. Rotation process has been cancelled. The current tenant token remains valid.

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

const data =
  await accessTokensTenantTokensClient.cancelRotation();

finishRotation

Finishes tenant token rotation

Required scope: environment-api:tenant-token-rotation:write Required permission: environment:roles:manage-settings

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

Returns

Success. The rotation process is completed. The active field of the response contains the new tenant token.

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

const data =
  await accessTokensTenantTokensClient.finishRotation();

startRotation

Starts tenant token rotation

Required scope: environment-api:tenant-token-rotation:write Required permission: environment:roles:manage-settings

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

Returns

Success. The new tenant token is created and will replace the old one. The active field of the response contains the new tenant token.

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

const data =
  await accessTokensTenantTokensClient.startRotation();

activeGatesAutoUpdateConfigurationClient

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

getAutoUpdateConfigById

Gets the configuration of auto-update for the specified ActiveGate

Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings

Parameters

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

Returns

Success

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

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

getGlobalAutoUpdateConfigForTenant

Gets the global auto-update configuration of environment ActiveGates.

Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings

Returns

Success

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

const data =
  await activeGatesAutoUpdateConfigurationClient.getGlobalAutoUpdateConfigForTenant();

putAutoUpdateConfigById

Updates the configuration of auto-update for the specified ActiveGate

Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings

Parameters

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.body*requiredActiveGateAutoUpdateConfig
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

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

putGlobalAutoUpdateConfigForTenant

Puts the global auto-update configuration of environment ActiveGates.

Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings

Parameters

NameType
config.body*requiredActiveGateGlobalAutoUpdateConfig
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateConfigurationClient.putGlobalAutoUpdateConfigForTenant(
    { body: {} },
  );

validateAutoUpdateConfigById

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

Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings

Parameters

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.body*requiredActiveGateAutoUpdateConfig
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

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

validateGlobalAutoUpdateConfigForTenant

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

Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings

Parameters

NameType
config.body*requiredActiveGateGlobalAutoUpdateConfig
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";

const data =
  await activeGatesAutoUpdateConfigurationClient.validateGlobalAutoUpdateConfigForTenant(
    { body: {} },
  );

activeGatesAutoUpdateJobsClient

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

createUpdateJobForAg

Creates a new update job for the specified ActiveGate

Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings

Parameters

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

Returns

Success. The update-job have been created.

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

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

deleteUpdateJobByJobIdForAg

Deletes the specified update job

Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings

Parameters

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.jobId*requiredstringA unique identifier for a update-job of ActiveGate.
import { activeGatesAutoUpdateJobsClient } from "@dynatrace-sdk/client-classic-environment-v2";

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

getAllUpdateJobList

List ActiveGates with update jobs

Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings

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

Parameters

NameTypeDescription
config.fromstringThe 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.startVersionCompareTypeGetAllUpdateJobListQueryStartVersionCompareTypeFilters the resulting set of update jobs by the specified initial version. Specify the comparison operator here. default: "EQUAL"
config.targetVersionstringFilters the resulting set of update-jobs by the target version (required format <major>.<minor>.<revision>).
config.targetVersionCompareTypeGetAllUpdateJobListQueryTargetVersionCompareTypeFilters the resulting set of update jobs by the specified target version. Specify the comparison operator here. default: "EQUAL"
config.tostringThe 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.updateTypeGetAllUpdateJobListQueryUpdateTypeFilters the resulting set of update-jobs by the update type.

Returns

Success

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

const data =
  await activeGatesAutoUpdateJobsClient.getAllUpdateJobList();

getUpdateJobByJobIdForAg

Gets the parameters of the specified update job

Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings

Parameters

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

Returns

Success

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

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

getUpdateJobListByAgId

Lists update jobs for the specified ActiveGate

Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings

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.fromstringThe 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.startVersionCompareTypeGetUpdateJobListByAgIdQueryStartVersionCompareTypeFilters the resulting set of update jobs by the specified initial version. Specify the comparison operator here. default: "EQUAL"
config.targetVersionstringFilters the resulting set of update-jobs by the target version (required format <major>.<minor>.<revision>).
config.targetVersionCompareTypeGetUpdateJobListByAgIdQueryTargetVersionCompareTypeFilters the resulting set of update jobs by the specified target version. Specify the comparison operator here. default: "EQUAL"
config.tostringThe 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.updateTypeGetUpdateJobListByAgIdQueryUpdateTypeFilters the resulting set of update-jobs by the update type.

Returns

Success

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

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

validateUpdateJobForAg

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

Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings

Parameters

NameTypeDescription
config.agId*requiredstringThe ID of the required ActiveGate.
config.body*requiredUpdateJob
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

Lists all available ActiveGates

Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings

The response includes all ActiveGates that are currently connected to the environment or have been connected during last 2 hours.

Parameters

NameTypeDescription
config.autoUpdateGetAllActiveGatesQueryAutoUpdateFilters 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<GetAllActiveGatesQueryDisabledModuleItem>Filters the resulting set of ActiveGates by the disabled modules.
config.enabledModuleArray<GetAllActiveGatesQueryEnabledModuleItem>Filters the resulting set of ActiveGates by the enabled modules.
config.groupstringFilters the resulting set of ActiveGates by the group. You can specify a partial name. In that case, the CONTAINS operator is used.
config.hostnamestringFilters 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.loadBalancerAddressstringFilters 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.networkAddressstringFilters the resulting set of ActiveGates by the network address. You can specify a partial address. In that case, the CONTAINS operator is used.
config.networkZonestringFilters 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.osArchitectureGetAllActiveGatesQueryOsArchitectureFilters the resulting set of ActiveGates by the OS architecture of the host it's running on.
config.osTypeGetAllActiveGatesQueryOsTypeFilters 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.tokenStateGetAllActiveGatesQueryTokenStateFilters the resulting set of ActiveGates to those with authorization token in specified state.
config.typeGetAllActiveGatesQueryTypeFilters the resulting set of ActiveGates by the ActiveGate type.
config.updateStatusGetAllActiveGatesQueryUpdateStatusFilters the resulting set of ActiveGates by the auto-update status.
config.versionstringFilters the resulting set of ActiveGates by the specified version. Specify the version in <major>.<minor>.<revision> format (for example, 1.195.0) here.
config.versionCompareTypeGetAllActiveGatesQueryVersionCompareTypeFilters the resulting set of ActiveGates by the specified version. Specify the comparison operator here. default: "EQUAL"

Returns

Success

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

const data = await activeGatesClient.getAllActiveGates();

getOneActiveGateById

Gets the details of the specified ActiveGate

Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings

Parameters

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

Returns

Success

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

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

attacksClient

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

getAttack

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

Success

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

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

getAttacks

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.attackSelectorstringDefines 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.fieldsstringA 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.fromstringThe 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.nextPageKeystringThe 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 amount of attacks in a single response payload. The maximal allowed page size is 500. If not set, 100 is used.
config.sortstringSpecifies 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.tostringThe 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

Success

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

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

Success

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

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

getLogs

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.filterstringFilters 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.fromstringThe 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.nextPageKeystringThe 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 amount of log entries in a single response payload. The maximal allowed page size is 5000. If not set, 1000 is used.
config.sortstringThe sorting of audit log entries: timestamp: Oldest first. -timestamp: Newest first. If not set, the newest first sorting is applied. default: "-timestamp"
config.tostringThe 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

Success

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

Ingests a business event

Required scope: storage:events:write Required permission: storage:events:write

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

Returns

The provided business events are all accepted and will be processed.

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

1.11.1

1 day ago

1.10.0

2 months ago

1.9.1

2 months ago

1.8.2

3 months ago

1.8.0

3 months ago

1.7.0

4 months ago

1.6.0

5 months ago

1.4.2

6 months ago

1.2.4

9 months ago

1.2.3

9 months ago

1.4.0

7 months ago

1.2.2

10 months ago

1.3.0

8 months ago

1.1.0

11 months ago

1.0.4

1 year ago

0.6.11

1 year ago

0.6.8

1 year ago

0.6.7

1 year ago

0.6.4

1 year ago

0.6.1

1 year ago