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.
npm install @dynatrace-sdk/client-classic-environment-v2
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
- 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
| Name | Type |
|---|---|
| config.body*required | ActiveGateTokenCreate |
Returns
| Return type | Status code | Description |
|---|---|---|
| ActiveGateTokenCreated | 201 | Success. The token has been created. The body of the response contains the token secret. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.activeGateTokenIdentifier*required | string | The ActiveGate token identifier, consisting of prefix and public part of the token. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ActiveGateToken | 200 | Success. The response contains the metadata of the tokens. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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:
- Specify the number of results per page in the pageSize query parameter.
- Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.
Parameters
| Name | Type | Description |
|---|---|---|
| config.nextPageKey | string | 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.pageSize | number | 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 type | Status code | Description |
|---|---|---|
| ActiveGateTokenList | 200 | Success. The response contains the list of ActiveGate tokens. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.activeGateTokenIdentifier*required | string | The ActiveGate token identifier, consisting of prefix and public part of the token to be deleted. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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 type | Status code | Description |
|---|---|---|
| AgentConnectionToken | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type |
|---|---|
| config.body*required | ApiTokenCreate |
Returns
| Return type | Status code | Description |
|---|---|---|
| ApiTokenCreated | 201 | Success. The token has been created. The body of the response contains the token secret. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | 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 type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type |
|---|---|
| config.id*required | string |
Returns
| Return type | Status code | Description |
|---|---|---|
| ApiToken | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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:
- Specify the number of results per page in the pageSize query parameter.
- Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.
Parameters
| Name | Type | Description |
|---|---|---|
| config.apiTokenSelector | string | 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:
To set multiple criteria, separate them with commas ( |
| config.fields | string | Specifies the fields to be included in the response. The following fields are included by default:
To remove fields from the response, specify them with the minus ( You can include additional fields:
To add fields to the response, specify them with the plus ( 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, The fields string must be URL-encoded. |
| config.from | string | Filters tokens based on the last usage time. The start of the requested timeframe. You can use one of the following formats:
|
| config.nextPageKey | string | 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.pageSize | number | 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.sort | string | The sort order of the token list. You can sort by the following properties with a sign prefix for the sort order:
If no prefix is set, + is used. If not set, tokens are sorted by creation date with newest first. Default: -creationDate |
| config.to | string | Filters tokens based on the last usage time. The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ApiTokenList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type |
|---|---|
| config.body*required | ApiTokenSecret |
Returns
| Return type | Status code | Description |
|---|---|---|
| ApiToken | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | ApiTokenUpdate | |
| config.id*required | string | The ID of the token to be updated. You can't disable the token you're using for authentication of the request. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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 type | Status code | Description |
|---|---|---|
| TenantTokenConfig | 200 | Success. Rotation process has been cancelled. The current tenant token remains valid. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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 type | Status code | Description |
|---|---|---|
| TenantTokenConfig | 200 | Success. The rotation process is completed. The active field of the response contains the new tenant token. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.finishRotation();
getRotationStatus
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 type | Status code | Description |
|---|---|---|
| TenantTokenRotationStatus | 200 | Success. Returns rotation status. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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 type | Status code | Description |
|---|---|---|
| TenantTokenConfig | 200 | Success. 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 Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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 type | Status code | Description |
|---|---|---|
| ActiveGateGroups | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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 type | Status code | Description |
|---|---|---|
| ActiveGateTokenEnforcement | 200 | Success. The response contains the status of ActiveGate tokens enforcement |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.agId*required | string | The ID of the required ActiveGate. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ActiveGateAutoUpdateConfig | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Not 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
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 type | Status code | Description |
|---|---|---|
| ActiveGateGlobalAutoUpdateConfig | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesAutoUpdateConfigurationClient.getGlobalAutoUpdateConfigForTenant();
putAutoUpdateConfigById
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.agId*required | string | The ID of the required ActiveGate. |
| config.body*required | ActiveGateAutoUpdateConfig |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The auto-update configuration have been updated. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type |
|---|---|
| config.body*required | ActiveGateGlobalAutoUpdateConfig |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The global auto-update configuration have been updated. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.agId*required | string | The ID of the required ActiveGate. |
| config.body*required | ActiveGateAutoUpdateConfig |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Validated. The submitted auto-update configuration is valid. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type |
|---|---|
| config.body*required | ActiveGateGlobalAutoUpdateConfig |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Validated. The submitted configuration is valid. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.agId*required | string | The ID of the required ActiveGate. |
| config.body*required | UpdateJob |
Returns
| Return type | Status code | Description |
|---|---|---|
| UpdateJob | 201 | Success. The update-job have been created. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.agId*required | string | The ID of the required ActiveGate. |
| config.jobId*required | string | A unique identifier for a update-job of ActiveGate. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The update-job have been deleted. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.from | string | The start of the requested timeframe for update jobs. You can use one of the following formats:
If not set, the relative timeframe of one day is used ( Maximum timeframe is 31 days. |
| config.lastUpdates | boolean | If true, filters the resulting set of update jobs to the most recent update of each type.Default: false |
| config.startVersion | string | Filters 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.targetVersion | string | Filters 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.to | string | The end of the requested timeframe for update jobs. You can use one of the following formats:
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 type | Status code | Description |
|---|---|---|
| UpdateJobsAll | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.agId*required | string | The ID of the required ActiveGate. |
| config.jobId*required | string | A unique identifier for a update-job of ActiveGate. |
Returns
| Return type | Status code | Description |
|---|---|---|
| UpdateJob | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getUpdateJobByJobIdForAg(
{ agId: "...", jobId: "..." },
);
getUpdateJobListByAgId
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
| Name | Type | Description |
|---|---|---|
| config.agId*required | string | The ID of the required ActiveGate. |
| config.from | string | The start of the requested timeframe for update jobs. You can use one of the following formats:
If not set, the relative timeframe of one week is used ( Maximum timeframe is 31 days. |
| config.lastUpdates | boolean | If true, filters the resulting set of update jobs to the most recent update of each type.Default: false |
| config.startVersion | string | Filters 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.targetVersion | string | Filters 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.to | string | The end of the requested timeframe for update jobs. You can use one of the following formats:
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 type | Status code | Description |
|---|---|---|
| UpdateJobList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getUpdateJobListByAgId(
{ agId: "..." },
);
validateUpdateJobForAg
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
| Name | Type | Description |
|---|---|---|
| config.agId*required | string | The ID of the required ActiveGate. |
| config.body*required | UpdateJob |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Validated. The submitted update-job is valid. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.autoUpdate | "ENABLED" | "DISABLED" | Filters the resulting set of ActiveGates by the actual state of auto-update. |
| config.containerized | boolean | Filters the resulting set of ActiveGates to those which are running in container (true) or not (false). |
| config.disabledModule | Array<"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.enabledModule | Array<"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.fipsMode | boolean | Filters the resulting set of ActiveGates to those which are running in FIPS mode (true) or not (false). |
| config.group | string | Filters the resulting set of ActiveGates by the group. You can specify a partial name. In that case, the |
| config.hostname | string | 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 |
| config.loadBalancerAddress | string | Filters the resulting set of ActiveGates by the Load Balancer address. You can specify a partial address. In that case, the |
| config.networkAddress | string | Filters the resulting set of ActiveGates by the network address. You can specify a partial address. In that case, the |
| config.networkZone | string | Filters the resulting set of ActiveGates by the network zone. You can specify a partial name. In that case, the |
| config.online | boolean | Filters 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.tokenExpirationSet | boolean | Filters 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.version | string | Filters the resulting set of ActiveGates by the specified version. Specify the version in |
| 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 type | Status code | Description |
|---|---|---|
| ActiveGateList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.agId*required | string | The ID of the required ActiveGate. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ActiveGate | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Not 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
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
| Name | Type |
|---|---|
| config.body*required | RemoteConfigurationManagementOperationActiveGateRequest |
Returns
| Return type | Status code | Description |
|---|---|---|
| RemoteConfigurationManagementJob | 201 | Created |
Throws
| Error Type | Error Message |
|---|---|
| RemoteConfigurationManagementValidationResultError | Failed. The input is invalid. |
| ErrorEnvelopeError | Client 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
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
| Name | Type |
|---|---|
| config.body*required | RemoteConfigurationManagementOperationActiveGateRequest |
Returns
| Return type | Status code | Description |
|---|---|---|
| RemoteConfigurationManagementPreviewList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| RemoteConfigurationManagementValidationResultError | Failed. The input is invalid. |
| ErrorEnvelopeError | Client 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
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 type | Status code | Description |
|---|---|---|
| RemoteConfigurationManagementJob | 200 | Success |
| void | 204 | No remote configuration management job is currently running |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { activeGatesRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesRemoteConfigurationManagementClient.getCurrentRemoteIdentityOperationJob();
getRemoteIdentityOperationJob
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The ID of the required remote configuration management job. |
Returns
| Return type | Status code | Description |
|---|---|---|
| RemoteConfigurationManagementJob | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.from | string | The start of the requested timeframe for a remote configuration management job. You can use one of the following formats:
|
| config.to | string | The end of the requested timeframe for a remote configuration management job. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| RemoteConfigurationManagementJobList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { activeGatesRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesRemoteConfigurationManagementClient.getRemoteIdentityOperations();
validateRemoteIdentityOperation
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
| Name | Type |
|---|---|
| config.body*required | RemoteConfigurationManagementOperationActiveGateRequest |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| RemoteConfigurationManagementValidationResultError | Failed. The input is invalid. |
| ErrorEnvelopeError | Client 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
Gets sampling configuration.
Required scope: adaptive-traffic-management:sampling-configuration:read
Returns
| Return type | Status code | Description |
|---|---|---|
| AdaptiveTrafficManagementDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.fields | string | 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):
To add properties, specify them in a comma-separated list and prefix each property with a plus (for example, |
| config.id*required | string | The ID of the attack. |
Returns
| Return type | Status code | Description |
|---|---|---|
| Attack | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
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
| Name | Type | Description |
|---|---|---|
| config.attackSelector | string | 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
To set several criteria, separate them with a comma ( Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (
|
| config.fields | string | 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):
To add properties, specify them in a comma-separated list and prefix each property with a plus (for example, |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of thirty days is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of attacks in a single response payload. The maximal allowed page size is 500. If not set, 100 is used. |
| config.sort | string | Specifies one or more fields for sorting the attack list. Multiple fields can be concatenated using a comma ( You can sort by the following properties with a sign prefix for the sorting order.
|
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AttackList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The ID of the required log entry. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AuditLogEntry | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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:
- Specify the number of results per page in the pageSize query parameter.
- Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.
Parameters
| Name | Type | Description |
|---|---|---|
| config.filter | string | Filters the audit log. You can use the following criteria:
For each criterion, you can specify multiple alternatives with comma-separated values. In this case, the OR logic applies. For example, You can specify multiple comma-separated criteria, such as Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (
|
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of log entries in a single response payload. The maximal allowed page size is 5000. If not set, 1000 is used. |
| config.sort | string | The sorting of audit log entries:
If not set, the newest first sorting is applied. Default: -timestamp |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AuditLog | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type |
|---|---|
| config.body*required | CloudEvent | 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 type | Status code | Description |
|---|---|---|
| void | 202 | The provided business events are all accepted and will be processed. |
Throws
| Error Type | Error Message |
|---|---|
| BizEventIngestResultError | Some business events are invalid. Valid business events are accepted and will be processed. | Content too large | Too many requests | Service is temporarily unavailable |
| ErrorEnvelopeError | Client 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
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
| Name | Type |
|---|---|
| config.body*required | Credentials |
Returns
| Return type | Status code | Description |
|---|---|---|
| CredentialsId | 201 | Success. The new credentials set has been created. The response contains the ID of the set. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The Dynatrace entity ID of the required credentials set. |
Returns
| Return type | Status code | Description |
|---|---|---|
| CredentialsResponseElement | 200 | Success. The response contains the metadata of the credentials set. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The Dynatrace entity ID of the required credentials set. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AbstractCredentialsResponseElement | 200 | Success. The response contains the details of the credentials set. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
Gets the details of the specified credentials sets.
The credentials set including username/certificate, password or token is included in the response.
Parameters
| Name | Type | Description |
|---|---|---|
| config.ids | string | The list of Dynatrace entity IDs of the required credentials sets (separated by commas). |
Returns
| Return type | Status code | Description |
|---|---|---|
| CredentialsDetailsList | 200 | Success. The response contains the details of the credentials sets. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.name | string | Filters the result by the name. When in quotation marks, whole phrase is taken. Case insensitive. |
| config.nextPageKey | string | 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.pageSize | number | The amount of credentials in a single response payload. The maximal allowed page size is 500. If not set, 100 is used. |
| config.scope | string | Filters 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.user | string | Filters credentials accessible to the user (owned by the user or the ones that are accessible for all). |
Returns
| Return type | Status code | Description |
|---|---|---|
| CredentialsList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
Deletes the specified credentials set
Required scope: environment-api:credentials:write Required permission: environment:roles:viewer
Provide credential ID in the path.
Parameters
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The ID of the credentials set to be deleted. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The credentials set has been deleted. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | Credentials | |
| config.id*required | string | The Dynatrace entity ID of the credentials set to be updated. |
Returns
| Return type | Status code | Description |
|---|---|---|
| CredentialsId | 201 | Success. The new credentials set has been created. The response contains the ID of the set. |
| void | 204 | Success. The credentials set has been updated. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.managementZoneFilter | string | 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.
You can specify several comma-separated criteria (for example, |
| config.nextPageKey | string | 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.pageSize | number | 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 type | Status code | Description |
|---|---|---|
| DavisSecurityAdviceList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type |
|---|---|
| config.body*required | EventIngest |
Returns
| Return type | Status code | Description |
|---|---|---|
| EventIngestResults | 201 | The event ingest request was received by the server. The response body indicates for each event whether its creation was successful. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Gets the properties of an event
Required scope: environment-api:events:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.eventId*required | string | The ID of the required event. |
Returns
| Return type | Status code | Description |
|---|---|---|
| Event | 200 | Success. The response contains the configuration of the event. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await eventsClient.getEvent({
eventId: "...",
});
getEventProperties
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
| Name | Type | Description |
|---|---|---|
| config.nextPageKey | string | 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.pageSize | number | 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 type | Status code | Description |
|---|---|---|
| EventPropertiesList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await eventsClient.getEventProperties();
getEventProperty
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
| Name | Type | Description |
|---|---|---|
| config.propertyKey*required | string | The event property key you're inquiring. |
Returns
| Return type | Status code | Description |
|---|---|---|
| EventPropertyDetails | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await eventsClient.getEventProperty({
propertyKey: "...",
});
getEventType
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
| Name | Type | Description |
|---|---|---|
| config.eventType*required | string | The event type you're inquiring. |
Returns
| Return type | Status code | Description |
|---|---|---|
| EventType | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await eventsClient.getEventType({
eventType: "...",
});
getEventTypes
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
| Name | Type | Description |
|---|---|---|
| config.nextPageKey | string | 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.pageSize | number | 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 type | Status code | Description |
|---|---|---|
| EventTypeList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await eventsClient.getEventTypes();
getEvents
Lists events within the specified timeframe
Required scope: environment-api:events:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.entitySelector | string | The entity scope of the query. You must set one of these criteria:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. The number of entities that can be selected is limited to 10000. |
| config.eventSelector | string | 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.
To set several criteria, separate them with commas ( |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two hours is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of events in a single response payload. The maximal allowed page size is 1000. If not set, 100 is used. |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| EventList | 200 | Success. The response contains the list of events. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | ExtensionEnvironmentConfigurationVersion | |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionEnvironmentConfigurationVersion | 200 | Success. Environment configuration created. If the requested version was already active, this is an idempotent no-op (no backend state changes). |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | Array<MonitoringConfigurationDto> | |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| MonitoringConfigurationResponse | 200 | Success |
| ErrorEnvelope | 207 | Multi-Status, if not all requests resulted in the same status |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeArrayError | Failed. The input is invalid. | Failed. The requested resource doesn't exist. |
| ErrorEnvelopeError | 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.createMonitoringConfiguration({
extensionName: "...",
body: [{ scope: "HOST-D3A3C5A146830A79" }],
});
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | Array<MonitoringConfigurationDto> | |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| MonitoringConfigurationResponse | 200 | Success |
| ErrorEnvelope | 207 | Multi-Status, if not all requests resulted in the same status |
deleteEnvironmentConfiguration
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionEnvironmentConfigurationVersion | 200 | Success. Environment configuration deactivated. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.deleteEnvironmentConfiguration(
{ extensionName: "..." },
);
executeExtensionMonitoringConfigurationActions
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.body*required | ExecuteActionsDto | |
| config.configurationId*required | string | The ID of the requested monitoring configuration. |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExecuteActionsResponse | 202 | Accepted. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.extensionName*required | string | The name of the requested extension 2.0. |
| config.extensionVersion*required | string | The version of the requested extension 2.0 Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))? |
Returns
| Return type | Status code | Description |
|---|---|---|
| SchemaDefinitionRestDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.extensionConfigurationSchema({
extensionName: "...",
extensionVersion: "...",
});
extensionDetails
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
| Name | Type | Description |
|---|---|---|
| config.acceptType*required | "application/json; charset=utf-8" | |
| config.extensionName*required | string | The name of the requested extension 2.0. |
| config.extensionVersion*required | string | The version of the requested extension 2.0 Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))? |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.extensionDetails({
acceptType: "application/json; charset=utf-8",
extensionName: "...",
extensionVersion: "...",
});
Parameters
| Name | Type | Description |
|---|---|---|
| config.acceptType*required | "application/octet-stream" | "application/yaml" | |
| config.extensionName*required | string | The name of the requested extension 2.0. |
| config.extensionVersion*required | string | The version of the requested extension 2.0 Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))? |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success |
extensionMonitoringConfigurations
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.active | boolean | Filters the resulting set of configurations by the active state. |
| config.extensionName*required | string | The name of the requested extension 2.0. |
| config.nextPageKey | string | 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.pageSize | number | The amount of extensions in a single response payload. The maximal allowed page size is 100. If not set, 20 is used. |
| config.version | string | Filters the resulting set of configurations by extension 2.0 version. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionMonitoringConfigurationsList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionEnvironmentConfigurationVersion | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getActiveEnvironmentConfiguration(
{ extensionName: "..." },
);
getActiveGateGroupsInfo
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.extensionName*required | string | The name of the requested extension 2.0. |
| config.extensionVersion*required | string | The version of the requested extension 2.0 Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))? |
Returns
| Return type | Status code | Description |
|---|---|---|
| ActiveGateGroupsInfoDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getActiveGateGroupsInfo({
extensionName: "...",
extensionVersion: "...",
});
getAlertTemplate
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.assetId*required | string | ID of the requested asset. |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AlertTemplateDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getAlertTemplate({
extensionName: "...",
assetId: "...",
});
getEnvironmentConfigurationAssetsInfo
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionAssetsDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getEnvironmentConfigurationAssetsInfo(
{ extensionName: "..." },
);
getExtensionMonitoringConfigurationStatus
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.configurationId*required | string | The ID of the requested monitoring configuration. |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionStatusDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getExtensionMonitoringConfigurationStatus(
{ extensionName: "...", configurationId: "..." },
);
getExtensionStatus
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionStatusWithIdDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getExtensionStatus({
extensionName: "...",
});
getJmxProcess
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.hostId | string | Filters 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*required | string | Id of the Java process discovered in the environment. |
Returns
| Return type | Status code | Description |
|---|---|---|
| JavaProcessDetails | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.hostId | string | Filters 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*required | string | Id of the Java process discovered in the environment. |
Returns
| Return type | Status code | Description |
|---|---|---|
| PmiProcessDetails | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.fileName*required | string | The name of the schema file. |
| config.schemaVersion*required | string | The version of the schema. Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))? |
Returns
| Return type | Status code | Description |
|---|---|---|
| JsonNode | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getSchemaFile({
schemaVersion: "...",
fileName: "...",
});
installExtension
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.extensionName*required | string | The name of the requested extension 2.0. |
| config.version | string | Filters the resulting set of configurations by extension 2.0 version. |
Returns
| Return type | Status code | Description |
|---|---|---|
| RegisteredExtensionResultDto | 200 | Success. 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 Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.name | string | Filters the resulting set of extensions 2.0 by name. You can specify a partial name. In that case, the CONTAINS operator is used. |
| config.nextPageKey | string | 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.pageSize | number | The amount of extensions in a single response payload. The maximal allowed page size is 100. If not set, 20 is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionInfoList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.listExtensionInfos();
listExtensionVersions
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.extensionName*required | string | The name of the requested extension 2.0. |
| config.nextPageKey | string | 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.pageSize | number | The amount of extensions in a single response payload. The maximal allowed page size is 100. If not set, 20 is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.listExtensionVersions({
extensionName: "...",
});
listExtensions
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.name | string | Filters the resulting set of extensions 2.0 by name. You can specify a partial name. In that case, the CONTAINS operator is used. |
| config.nextPageKey | string | 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.pageSize | number | The amount of extensions in a single response payload. The maximal allowed page size is 100. If not set, 20 is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.listExtensions();
listJmxProcesses
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.hostId | string | Filters 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 type | Status code | Description |
|---|---|---|
| JavaProcessContainerList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.listJmxProcesses();
listPmiProcesses
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.hostId | string | Filters 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 type | Status code | Description |
|---|---|---|
| JavaProcessContainerList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.listPmiProcesses();
listSchemaFiles
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
| Name | Type | Description |
|---|---|---|
| config.acceptType*required | "application/json; charset=utf-8" | |
| config.schemaVersion*required | string | The version of the schema. Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))? |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.listSchemaFiles({
acceptType: "application/json; charset=utf-8",
schemaVersion: "...",
});
Parameters
| Name | Type | Description |
|---|---|---|
| config.acceptType*required | "application/octet-stream" | |
| config.schemaVersion*required | string | The version of the schema. Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))? |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success |
listSchemas
⚠️ Deprecated
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 type | Status code | Description |
|---|---|---|
| SchemasList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.listSchemas();
monitoringConfigurationAudit
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.configurationId*required | string | The ID of the requested monitoring configuration. |
| config.extensionName*required | string | The name of the requested extension 2.0. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of extensions in a single response payload. The maximal allowed page size is 100. If not set, 20 is used. |
| config.sort | string | The sorting of audit log entries:
If not set, the newest first sorting is applied. Default: -timestamp |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AuditLog | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.monitoringConfigurationAudit({
extensionName: "...",
configurationId: "...",
});
monitoringConfigurationDetails
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.configurationId*required | string | The ID of the requested monitoring configuration. |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionMonitoringConfiguration | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.monitoringConfigurationDetails(
{ extensionName: "...", configurationId: "..." },
);
removeExtension
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.extensionName*required | string | The name of the requested extension 2.0. |
| config.extensionVersion*required | string | The version of the requested extension 2.0 Pattern: ^(0|[1-9]\d*)(\.(0|[1-9]\d*))?(\.(0|[1-9]\d*))? |
Returns
| Return type | Status code | Description |
|---|---|---|
| Extension | 200 | Success. The extension 2.0 version has been deleted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.configurationId*required | string | The ID of the requested monitoring configuration. |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | ExtensionEnvironmentConfigurationVersion | |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionEnvironmentConfigurationVersion | 200 | Success. Environment configuration updated. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | MonitoringConfigurationUpdateDto | |
| config.configurationId*required | string | The ID of the requested monitoring configuration. |
| config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
| Return type | Status code | Description |
|---|---|---|
| MonitoringConfigurationResponse | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | Blob | |
| config.validateOnly | boolean | Only run validation but do not persist the extension even if validation was successful. Default: false |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExtensionUploadResponseDto | 200 | The extension is valid |
| ExtensionUploadResponseDto | 201 | Success. The extension 2.0 has been uploaded. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.registry | string | Registry name containing the container images. For a list of registries, see Dynatrace Documentation |
| config.registryFilter | string | Partial registry name filter. Returns images for the first registry whose name contains this value. Ignored when 'registry' is provided. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ContainerImageData | 200 | Container images data returned |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
Deletes the specified JavaScript mapping file
Required scope: deobfuscation:symbol-files:delete
Parameters
| Name | Type | Description |
|---|---|---|
| config.fileType*required | "MINIFIED" | "SOURCE" | "SOURCEMAP" | The type of the JavaScript mapping file. |
| config.minifiedJsFileUrl*required | string | The URL of the minified JavaScript file. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. File deleted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Deletes the specified JavaScript mapping file
Required scope: deobfuscation:symbol-files:delete
Parameters
| Name | Type | Description |
|---|---|---|
| config.fileType*required | "MINIFIED" | "SOURCE" | "SOURCEMAP" | The type of the JavaScript mapping file. |
| config.minifiedJsFileUrl*required | string | The URL of the minified JavaScript file. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. File deleted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Lists metadata of JavaScript mapping files
Required scope: deobfuscation:symbol-files:read
Parameters
| Name | Type | Description |
|---|---|---|
| config.fileType | "MINIFIED" | "SOURCE" | "SOURCEMAP" | Filters the resulting set of JavaScript mapping files by file type. |
| config.minifiedJsFileUrl | string | Filters the resulting set of JavaScript mapping files by the minified JavaScript file URL. Only equals are taken into account. |
| config.nextPageKey | string | 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.pageSize | number | 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 type | Status code | Description |
|---|---|---|
| JavaScriptMappingFileListDto | 200 | Success. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await javaScriptMappingFilesClient.getJavaScriptMappingFilesMetadata();
getJavaScriptMappingFilesMetadataAlias
Lists metadata of JavaScript mapping files
Required scope: deobfuscation:symbol-files:read
Parameters
| Name | Type | Description |
|---|---|---|
| config.fileType | "MINIFIED" | "SOURCE" | "SOURCEMAP" | Filters the resulting set of JavaScript mapping files by file type. |
| config.minifiedJsFileUrl | string | Filters the resulting set of JavaScript mapping files by the minified JavaScript file URL. Only equals are taken into account. |
| config.nextPageKey | string | 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.pageSize | number | 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 type | Status code | Description |
|---|---|---|
| JavaScriptMappingFileListDto | 200 | Success. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { javaScriptMappingFilesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await javaScriptMappingFilesClient.getJavaScriptMappingFilesMetadataAlias();
updateJavaScriptMappingFileMetadata
⚠️ Deprecated
Updates metadata of the specified JavaScript mapping file
Required scope: deobfuscation:symbol-files:write
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | JavaScriptMappingFileMetadataDto | |
| config.fileType*required | "MINIFIED" | "SOURCE" | "SOURCEMAP" | The type of the JavaScript mapping file. |
| config.minifiedJsFileUrl*required | string | The URL of the minified JavaScript file. |
Returns
| Return type | Status code | Description |
|---|---|---|
| JavaScriptMappingFileDto | 200 | Success. Metadata updated. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Updates metadata of the specified JavaScript mapping file
Required scope: deobfuscation:symbol-files:write
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | JavaScriptMappingFileMetadataDto | |
| config.fileType*required | "MINIFIED" | "SOURCE" | "SOURCEMAP" | The type of the JavaScript mapping file. |
| config.minifiedJsFileUrl*required | string | The URL of the minified JavaScript file. |
Returns
| Return type | Status code | Description |
|---|---|---|
| JavaScriptMappingFileDto | 200 | Success. Metadata updated. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Uploads new or updates existing JavaScript mapping file
Required scope: deobfuscation:symbol-files:write
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | UploadJavaScriptMappingFileBody | |
| config.fileType*required | "MINIFIED" | "SOURCE" | "SOURCEMAP" | The type of the JavaScript mapping file. |
| config.minifiedJsFileUrl*required | string | The URL of the minified JavaScript file. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The file has been uploaded and stored. Existing file replaced. |
| void | 201 | Success. The file has been uploaded and stored. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
Uploads new or updates existing JavaScript mapping file
Required scope: deobfuscation:symbol-files:write
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | UploadJavaScriptMappingFileAliasBody | |
| config.fileType*required | "MINIFIED" | "SOURCE" | "SOURCEMAP" | The type of the JavaScript mapping file. |
| config.minifiedJsFileUrl*required | string | The URL of the minified JavaScript file. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The file has been uploaded and stored. Existing file replaced. |
| void | 201 | Success. The file has been uploaded and stored. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
| config.nextPageKey | string | 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.pageSize | number | The number of results per result page. Default: 1000Minimum: 1 |
| config.query | string | The log search query. The query must use the Dynatrace search query language. |
| config.sort | string | Defines the ordering of the log records. Each field has a sign prefix (+/-) for sorting order. If no sign prefix is set, then the 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: -timestampPattern: ^[+-]?[a-z]+$ |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ExportedLogRecordList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
| config.groupBy | Array<string> | The groupings to be included in the response. You can specify several groups in the following format: 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, |
| config.maxGroupValues | number | The maximum number of values in each group. You can get up to 100 values per group. If not set, 10 is used. Default: 10Minimum: 1 |
| config.query | string | The log search query. The query must use the Dynatrace search query language. |
| config.timeBuckets | number | 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: 1Minimum: 1 |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AggregatedLog | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
| config.limit | number | The desired amount of log records. The maximal allowed limit is 1000. If not set, 1000 is used. Default: 1000Minimum: 1 |
| config.nextSliceKey | string | 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.query | string | The log search query. The query must use the Dynatrace search query language. |
| config.sort | string | Defines the ordering of the log records. Each field has a sign prefix (+/-) for sorting order. If no sign prefix is set, then the 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: -timestampPattern: ^[+-]?[a-z]+$ |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| LogRecordsList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | LogMessageJson | 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.contentType | string | (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.xDynatraceAttr | string | (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.xDynatraceOptions | string | (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 type | Status code | Description |
|---|---|---|
| SuccessEnvelope | 200 | Only a part of input events were ingested due to event invalidity. For details, check the response body. |
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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:
-
Specify the number of results per page in the pageSize query parameter.
-
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
| Name | Type | Description |
|---|---|---|
| config.acceptType*required | "application/json; charset=utf-8" | "text/csv; header=absent; charset=utf-8" | "text/csv; header=present; charset=utf-8" | |
| config.fields | string | Defines the list of metric properties included in the response.
To add properties, list them with leading plus To specify several properties, join them with a comma (for example If you specify just one property, the response contains the metric key and the specified property. To return metric keys only, specify |
| config.metadataSelector | string | 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
To set several criteria, separate them with a comma ( 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: |
| config.metricSelector | string | Selects metrics for the query by their keys. You can specify multiple metric keys separated by commas (for example, You can select a full set of related metrics by using a trailing asterisk ( You can set additional transformation operators, separated by a colon ( Only If the metric key contains any symbols you must quote (
For example, to query the metric with the key of ext:selfmonitoring.jmx.Agents: Type "APACHE" you must specify this selector:
To find metrics based on a search term, rather than metricId, use the text query parameter instead of this one. |
| config.nextPageKey | string | 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.pageSize | number | 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.text | string | Metric 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.writtenSince | string | Filters the resulted set of metrics to those that have data points within the specified timeframe. You can use one of the following formats:
|
| config.writtenSinceMode | string | Controls how the writtenSince filter is applied.
If not specified, the default is |
Returns
| Return type | Status code | Description |
|---|---|---|
| MetricDescriptorCollection | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.metricSelector*required | string | Selects metrics to be considered for deletion. You can select a full set of related metrics by using a trailing asterisk ( |
| config.minUnusedDays*required | number | The number of days since the metric was last used. Must be between 30 and 1825 (5 years).Minimum: 30 |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 202 | Success. The deletion of the metrics has been triggered. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.metricKey*required | string | The key of the required metric. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 202 | Success. The deletion of the metric has been triggered. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await metricsClient.delete({
metricKey: "...",
});
ingest
Pushes metric data points to Dynatrace
One of the following scopes is required:
- storage:metrics:write
- openpipeline:metrics:ingest
Parameters
| Name | Type |
|---|---|
| config.body*required | string |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 202 | The provided business events are all accepted and will be processed. |
Throws
| Error Type | Error Message |
|---|---|
| ValidationResponseError | Some data points are invalid. Valid data points are accepted and will be processed in the background. |
| ErrorEnvelopeError | Client 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
Gets the descriptor of the specified metric
Required scope: environment-api:metrics:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.acceptType*required | "application/json; charset=utf-8" | "text/csv; header=absent; charset=utf-8" | "text/csv; header=present; charset=utf-8" | |
| config.metricKey*required | string | The key of the required metric. You can set additional transformation operators, separated by a colon ( |
Returns
| Return type | Status code | Description |
|---|---|---|
| MetricDescriptor | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.acceptType*required | "application/json; charset=utf-8" | "text/csv; header=absent; charset=utf-8" | "text/csv; header=present; charset=utf-8" | |
| config.entitySelector | string | 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:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. Use the To set a universal scope matching all entities, omit this parameter. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two hours is used ( |
| config.metricSelector | string | 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, If the metric key contains any symbols you must quote (
For example, to query the metric with the key of ext:selfmonitoring.jmx.Agents: Type "APACHE" you must specify this selector:
You can set additional transformation operators, separated by a colon ( |
| config.mzSelector | string | 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
|
| config.resolution | string | The desired resolution of data points. You can use one of the following options:
Valid units for the timespan are:
If not set, the default is 120 data points. For example:
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:
If a resolution is not specified for a given index, the default of 120 data points is applied. Examples:
|
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| MetricData | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.fields | string | 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:
By default, the ID, the display name, and the symbol are included. To add properties, list them with leading plus To specify several properties, join them with a comma (for example If you specify just one property, the response contains the unitId and the specified property. To return unit IDs only, specify |
| config.unitSelector | string | Selects units to be included to the response. Available criteria:
|
Returns
| Return type | Status code | Description |
|---|---|---|
| UnitList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { metricsUnitsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await metricsUnitsClient.allUnits();
convert
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
| Name | Type | Description |
|---|---|---|
| config.numberFormat | string | The preferred number format of the target value. You can specify the following formats:
`Only used if the target unit if not set. |
| config.targetUnit | string | 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*required | string | The ID of the source unit. |
| config.value*required | number | The value to be converted. |
Returns
| Return type | Status code | Description |
|---|---|---|
| UnitConversionResult | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Gets the properties of the specified unit
Required scope: environment-api:metrics:read Required permission: environment:roles:viewer
Parameters
| Name | Type |
|---|---|
| config.unitId*required | string |
Returns
| Return type | Status code | Description |
|---|---|---|
| Unit | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Deletes React Native mapping file | maturity=EARLY_ADOPTER
Required scope: deobfuscation:symbol-files:delete
Parameters
| Name | Type | Description |
|---|---|---|
| config.appId*required | string | The UUID of the application the mapping file belongs to. |
| config.bundleName*required | string | The name of the bundle. |
| config.bundleVersion*required | string | The version of the bundle. |
| config.fileName*required | string | The 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 type | Status code | Description |
|---|---|---|
| void | 200 | Success. File deleted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.appId*required | string | The UUID of the application the mapping file belongs to. |
| config.bundleName*required | string | The name of the bundle. |
| config.bundleVersion*required | string | The version of the bundle. |
| config.fileName*required | string | The name of the mapping file, e.g. "index.android.bundle" or "index.ios.bundle". |
| config.ifNoneMatch | string | The 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 type | Status code | Description |
|---|---|---|
| void | 200 | Success. Response body contains a newer file than defined in the If-None-Match header. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.nextPageKey | string | 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.pageSize | number | 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 type | Status code | Description |
|---|---|---|
| ReactNativeMappingFileListDto | 200 | Success. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { mobileDeobfuscationAndSymbolicationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await mobileDeobfuscationAndSymbolicationClient.list();
list_1
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
| Name | Type | Description |
|---|---|---|
| config.appId*required | string | The UUID of the application the mapping file belongs to. |
| config.nextPageKey | string | 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.pageSize | number | 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 type | Status code | Description |
|---|---|---|
| ReactNativeMappingFileListDto | 200 | Success. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { mobileDeobfuscationAndSymbolicationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await mobileDeobfuscationAndSymbolicationClient.list_1({
appId: "...",
});
put
Adds new or updates existing React Native mapping file | maturity=EARLY_ADOPTER
Required scope: deobfuscation:symbol-files:write
Parameters
| Name | Type | Description |
|---|---|---|
| config.appId*required | string | The UUID of the application the mapping file belongs to. |
| config.body*required | PutBody | |
| config.bundleName*required | string | The name of the bundle. |
| config.bundleVersion*required | string | The version of the bundle. |
| config.fileName*required | string | The 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 type | Status code | Description |
|---|---|---|
| void | 200 | Success. The file has been uploaded and stored. Existing file replaced. |
| void | 201 | Success. The file has been uploaded and stored. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Updates metadata of the specified React Native mapping file | maturity=EARLY_ADOPTER
Required scope: deobfuscation:symbol-files:write
Parameters
| Name | Type | Description |
|---|---|---|
| config.appId*required | string | The UUID of the application the mapping file belongs to. |
| config.body*required | ReactNativeMappingFileMetadataUpdateDto | |
| config.bundleName*required | string | The name of the bundle. |
| config.bundleVersion*required | string | The version of the bundle. |
| config.fileName*required | string | The 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 type | Status code | Description |
|---|---|---|
| ReactNativeMappingFileMetadataDto | 200 | Success. Metadata updated. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.entitySelector*required | string | 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:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of three days is used ( |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SecurityContextResultDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await monitoredEntitiesClient.deleteSecurityContext({
entitySelector: "...",
});
getEntities
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:
- Key requests
- Top X requests that are used for baselining
- Requests that have caused a problem
You can limit the output by using pagination:
- Specify the number of results per page in the pageSize query parameter.
- Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.
Parameters
| Name | Type | Description |
|---|---|---|
| config.entitySelector | string | Defines the scope of the query. Only entities matching the specified criteria are included into response. You must set one of these criteria:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. The field is required when you're querying the first page of results. |
| config.fields | string | 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 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 When requesting large amounts of relationship fields, throttling can apply. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of three days is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of entities. If not set, 50 is used. |
| config.sort | string | 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 |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| EntitiesList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await monitoredEntitiesClient.getEntities();
getEntity
Gets the properties of the specified monitored entity
Required scope: environment-api:entities:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.entityId*required | string | The ID of the required entity. |
| config.fields | string | 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 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 When requesting large amounts of relationship fields, throttling can apply. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of three days is used ( |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| Entity | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await monitoredEntitiesClient.getEntity({
entityId: "...",
});
getEntityType
Gets a list of properties for the specified entity type
Required scope: environment-api:entities:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.type*required | string | The required entity type. |
Returns
| Return type | Status code | Description |
|---|---|---|
| EntityType | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await monitoredEntitiesClient.getEntityType({
type: "...",
});
getEntityTypes
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:
- Specify the number of results per page in the pageSize query parameter.
- Use the cursor from the nextPageKey field of the previous response in the nextPageKey query parameter to obtain subsequent pages.
Parameters
| Name | Type | Description |
|---|---|---|
| config.nextPageKey | string | 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.pageSize | number | 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 type | Status code | Description |
|---|---|---|
| EntityTypeList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await monitoredEntitiesClient.getEntityTypes();
pushCustomDevice
Creates or updates a custom device
Required scope: environment-api:entities:write Required permission: environment:roles:manage-settings
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | CustomDeviceCreation | |
| config.uiBased | boolean | If true, it will be handled as if it was created via UI. It will be refreshed automatically and won't age out. |
Returns
| Return type | Status code | Description |
|---|---|---|
| CustomDeviceCreationResult | 201 | Success |
| void | 204 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | SecurityContextDtoImpl | |
| config.entitySelector*required | string | 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:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of three days is used ( |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SecurityContextResultDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Deletes the specified tag from the specified entities
Required scope: environment-api:entities:write Required permission: environment:roles:manage-settings
Parameters
| Name | Type | Description |
|---|---|---|
| config.deleteAllWithKey | boolean |
If not set, |
| config.entitySelector*required | string | Specifies the entities where you want to delete tags. You must set one of these criteria:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of 24 hours is used ( |
| config.key*required | string | The key of the tag to be deleted. If deleteAllWithKey is For value-only tags, specify the value here. |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
| config.value | string | The value of the tag to be deleted. The value is ignored if deleteAllWithKey is For value-only tags, specify the value in the key parameter. |
Returns
| Return type | Status code | Description |
|---|---|---|
| DeletedEntityTags | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { monitoredEntitiesCustomTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await monitoredEntitiesCustomTagsClient.deleteTags({
key: "...",
entitySelector: "...",
});
getTags
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
| Name | Type | Description |
|---|---|---|
| config.entitySelector*required | string | Specifies the entities where you want to read tags. You must set one of these criteria:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of 24 hours is used ( |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| CustomEntityTags | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { monitoredEntitiesCustomTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await monitoredEntitiesCustomTagsClient.getTags({
entitySelector: "...",
});
postTags
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
| Name | Type | Description |
|---|---|---|
| config.body*required | AddEntityTags | |
| config.entitySelector*required | string | Specifies the entities where you want to update tags. You must set one of these criteria:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of 24 hours is used ( |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AddedEntityTags | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Lists monitoring states of entities
Required scope: environment-api:entities:read Required permission: environment:roles:viewer
Only process group instances are supported.
Parameters
| Name | Type | Description |
|---|---|---|
| config.entitySelector | string | Specifies the process group instances where you're querying the state. Use the You must set one of these criteria:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of 24 hours is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of monitoring states in a single response payload. The maximal allowed page size is 500. If not set, 500 is used. |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| MonitoredStates | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Unavailable | 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | NetworkZone | |
| config.id*required | string | 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 type | Status code | Description |
|---|---|---|
| EntityShortRepresentation | 201 | Success. The new network zone has been created. The response body contains the ID of the new network zone. |
| void | 204 | Success. The network zone has been updated. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The ID of the network zone to be deleted. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Deleted. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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 type | Status code | Description |
|---|---|---|
| NetworkZoneList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await networkZonesClient.getAllNetworkZones();
getHostStats
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
| Name | Type | Description |
|---|---|---|
| config.filter | "all" | "configuredButNotConnectedOnly" | "connectedAsAlternativeOnly" | "connectedAsFailoverOnly" | "connectedAsFailoverWithoutOwnActiveGatesOnly" | Filters the resulting set of hosts:
If not set, |
| config.id*required | string | The ID of the required network zone. |
Returns
| Return type | Status code | Description |
|---|---|---|
| NetworkZoneConnectionStatistics | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await networkZonesClient.getHostStats({
id: "...",
});
getNetworkZoneSettings
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 type | Status code | Description |
|---|---|---|
| NetworkZoneSettings | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await networkZonesClient.getNetworkZoneSettings();
getSingleNetworkZone
⚠️ Deprecated
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The ID of the required network zone. |
Returns
| Return type | Status code | Description |
|---|---|---|
| NetworkZone | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await networkZonesClient.getSingleNetworkZone({
id: "...",
});
updateNetworkZoneSettings
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
| Name | Type |
|---|---|
| config.body*required | NetworkZoneSettings |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The global network zones configuration has been updated. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type |
|---|---|
| config.body*required | RemoteConfigurationManagementOperationOneAgentRequest |
Returns
| Return type | Status code | Description |
|---|---|---|
| RemoteConfigurationManagementPreviewList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| RemoteConfigurationManagementValidationResultError | Failed. The input is invalid. |
| ErrorEnvelopeError | Client 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
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 type | Status code | Description |
|---|---|---|
| RemoteConfigurationManagementJob | 200 | Success |
| void | 204 | No remote configuration management job is currently running |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { oneAgentRemoteConfigurationManagementClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await oneAgentRemoteConfigurationManagementClient.getCurrentRemoteIdentityOperationJob_1();
getRemoteIdentityOperationJob_1
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The ID of the required remote configuration management job. |
Returns
| Return type | Status code | Description |
|---|---|---|
| RemoteConfigurationManagementJob | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type |
|---|---|
| config.body*required | RemoteConfigurationManagementOperationOneAgentRequest |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| RemoteConfigurationManagementValidationResultError | Failed. The input is invalid. |
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | ProblemCloseRequestDtoImpl | |
| config.problemId*required | string | The ID of the required problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ProblemCloseResult | 200 | Success |
| void | 204 | The problem is closed already the request hasn't been executed. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Adds a new comment on the specified problem
Required scope: environment-api:problems:write Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | CommentRequestDtoImpl | |
| config.problemId*required | string | The ID of the required problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 201 | Success. The comment has been added. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Deletes the specified comment from a problem
Required scope: environment-api:problems:write Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.commentId*required | string | The ID of the required comment. |
| config.problemId*required | string | The ID of the required problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The comment has been deleted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await problemsClient.deleteComment({
problemId: "...",
commentId: "...",
});
getComment
Gets the specified comment on a problem
Required scope: environment-api:problems:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.commentId*required | string | The ID of the required comment. |
| config.problemId*required | string | The ID of the required problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| Comment | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await problemsClient.getComment({
problemId: "...",
commentId: "...",
});
getComments
Gets all comments on the specified problem
Required scope: environment-api:problems:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.nextPageKey | string | 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.pageSize | number | The amount of comments in a single response payload. The maximal allowed page size is 500. If not set, 10 is used. |
| config.problemId*required | string | The ID of the required problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| CommentsList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await problemsClient.getComments({
problemId: "...",
});
getProblem
Gets the properties of the specified problem
Required scope: environment-api:problems:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.fields | string | 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):
To add properties, specify them as a comma-separated list (for example, |
| config.problemId*required | string | The ID of the required problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| Problem | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await problemsClient.getProblem({
problemId: "...",
});
getProblems
Lists problems observed within the specified timeframe
Required scope: environment-api:problems:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.entitySelector | string | The entity scope of the query. You must set one of these criteria:
You can add one or more of the following criteria. Values are case-sensitive and the
For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( The maximum string length is 2,000 characters. The maximum number of entities that may be selected is limited to 10000. |
| config.fields | string | 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):
To add properties, specify them as a comma-separated list (for example, The field is valid only for the current page of results. You must set it for each page you're requesting. |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two hours is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of problems in a single response payload. The maximal allowed page size is 500. If not set, 50 is used. |
| config.problemSelector | string | 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.
To set several criteria, separate them with a comma ( |
| config.sort | string | Specifies a set of comma-separated ( You can sort by the following properties with a sign prefix for the sorting order.
If no prefix is set, You can specify several levels of sorting. For example, |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| Problems | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { problemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await problemsClient.getProblems();
updateComment
Updates the specified comment on a problem
Required scope: environment-api:problems:write Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | CommentRequestDtoImpl | |
| config.commentId*required | string | The ID of the required comment. |
| config.problemId*required | string | The ID of the required problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The comment has been updated. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Returns all releases
Required scope: environment-api:releases:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.demo | boolean | Get your Releases (false) or a set of demo Releases (true).Default: false |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of Releases in a single response payload. The maximal allowed page size is 1000. If not set, 100 is used. |
| config.releasesSelector | string | 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.
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.sort | string | 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:
If not set, the ascending order sorting for name is applied. Default: name |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| Releases | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.applicationId*required | string | The ID of the web application. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the inline code. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { rumManualInsertionTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await rumManualInsertionTagsClient.getInlineCode({
applicationId: "...",
});
getJavaScriptTag
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
| Name | Type | Description |
|---|---|---|
| config.applicationId*required | string | The ID of the web application. |
| config.crossOriginAnonymous | boolean | Indicates 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 type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the JavaScript Tag. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { rumManualInsertionTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await rumManualInsertionTagsClient.getJavaScriptTag({
applicationId: "...",
});
getOneAgentJavaScriptTag
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
| Name | Type | Description |
|---|---|---|
| config.applicationId*required | string | The 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 type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the OneAgent JavaScript Tag. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { rumManualInsertionTagsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await rumManualInsertionTagsClient.getOneAgentJavaScriptTag(
{ applicationId: "..." },
);
getOneAgentJavaScriptTagWithSri
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
| Name | Type | Description |
|---|---|---|
| config.applicationId*required | string | The 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 type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the OneAgent JavaScript Tag with SRI. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Mutes several remediation items
Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | RemediationItemsBulkMute | |
| config.id*required | string | The ID of the requested third-party security problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| RemediationItemsBulkMuteResponse | 200 | Success. The remediation item(s) have been muted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Mutes several security problems
Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems
Parameters
| Name | Type |
|---|---|
| config.body*required | SecurityProblemsBulkMute |
Returns
| Return type | Status code | Description |
|---|---|---|
| SecurityProblemsBulkMuteResponse | 200 | Success. The security problem(s) have been muted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Un-mutes several remediation items
Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | RemediationItemsBulkUnmute | |
| config.id*required | string | The ID of the requested third-party security problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| RemediationItemsBulkUnmuteResponse | 200 | Success. The remediation item(s) have been un-muted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Un-mutes several security problems
Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems
Parameters
| Name | Type |
|---|---|
| config.body*required | SecurityProblemsBulkUnmute |
Returns
| Return type | Status code | Description |
|---|---|---|
| SecurityProblemsBulkUnmuteResponse | 200 | Success. The security problem(s) have been un-muted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of thirty days is used ( |
| config.id*required | string | The ID of the requested security problem. |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SecurityProblemEventsList | 200 | Success. The response contains the list of security problem events. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.getEventsForSecurityProblem({
id: "...",
});
getRemediationItem
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The ID of the requested third-party security problem. |
| config.remediationItemId*required | string | The ID of the remediation item. |
Returns
| Return type | Status code | Description |
|---|---|---|
| RemediationDetailsItem | 200 | Success. The response contains details of a single remediation item of a security problem. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.getRemediationItem({
id: "...",
remediationItemId: "...",
});
getRemediationItems
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The ID of the requested third-party security problem. |
| config.remediationItemSelector | string | 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
To set several criteria, separate them with a comma ( Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (
|
Returns
| Return type | Status code | Description |
|---|---|---|
| RemediationItemList | 200 | Success. The response contains the list of remediation items of a problem. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.getRemediationItems({
id: "...",
});
getRemediationProgressEntities
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
| Name | Type | Description |
|---|---|---|
| config.id*required | string | The ID of the requested third-party security problem. |
| config.remediationItemId*required | string | The ID of the remediation item. |
| config.remediationProgressEntitySelector | string | 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
To set several criteria, separate them with a comma ( Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (
|
Returns
| Return type | Status code | Description |
|---|---|---|
| RemediationProgressEntityList | 200 | Success. 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 Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.getRemediationProgressEntities(
{ id: "...", remediationItemId: "..." },
);
getSecurityProblem
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
| Name | Type | Description |
|---|---|---|
| config.fields | string | 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):
To add properties, specify them in a comma-separated list and prefix each property with a plus (for example, |
| config.from | string | Based on the timeframe start the affected-, related- and vulnerable entities are being calculated. You can use one of the following formats:
If not set, the default timeframe start of 24 hours in the past is used ( The timeframe start must not be older than 365 days. |
| config.id*required | string | The ID of the requested security problem. |
| config.managementZoneFilter | string | 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.
You can specify several comma-separated criteria (for example, |
Returns
| Return type | Status code | Description |
|---|---|---|
| SecurityProblemDetails | 200 | Success. The response contains parameters of the security problem. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.getSecurityProblem({
id: "...",
});
getSecurityProblems
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
| Name | Type | Description |
|---|---|---|
| config.fields | string | 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):
To add properties, specify them in a comma-separated list and prefix each property with a plus (for example, |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of thirty days is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of security problems in a single response payload. The maximal allowed page size is 500. If not set, 100 is used. |
| config.securityProblemSelector | string | 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
Risk score and risk category are mutually exclusive (cannot be used at the same time). To set several criteria, separate them with a comma ( Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (
|
| config.sort | string | Specifies one or more fields for sorting the security problem list. Multiple fields can be concatenated using a comma ( You can sort by the following properties with a sign prefix for the sorting order.
If no prefix is set, |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. The end of the timeframe must not be older than 365 days. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SecurityProblemList | 200 | Success. The response contains the list of security problems. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.getSecurityProblems();
getVulnerableFunctions
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
| Name | Type | Description |
|---|---|---|
| config.groupBy | string | Defines additional grouping types in which vulnerable functions should be displayed. You can add one of the following grouping types.
|
| config.id*required | string | The ID of the requested third-party security problem. |
| config.vulnerableFunctionsSelector | string | 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
Specify the value of a criterion as a quoted string. The following special characters must be escaped with a tilde (
|
Returns
| Return type | Status code | Description |
|---|---|---|
| VulnerableFunctionsContainer | 200 | Success. The response contains the list of vulnerable functions. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.getVulnerableFunctions({
id: "...",
});
muteSecurityProblem
Mutes a security problem
Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | SecurityProblemMute | |
| config.id*required | string | The ID of the requested security problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The security problem has been muted. |
| void | 204 | Not executed. The security problem is already muted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Sets the mute state of a remediation item
Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | RemediationItemMuteStateChange | |
| config.id*required | string | The ID of the requested third-party security problem. |
| config.remediationItemId*required | string | The ID of the remediation item. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The requested mute state has been applied to the remediation item. |
| void | 204 | Not executed. The remediation item was previously put into the requested mute state by the same user with the same reason and comment. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | RemediationItemsBulkUpdateDeleteDto | |
| config.id*required | string | The ID of the requested third-party security problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The requested tracking links have been updated. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.trackingLinkBulkUpdateAndDelete(
{ id: "...", body: {} },
);
unmuteSecurityProblem
Un-mutes a security problem
Required scope: environment-api:security-problems:write Required permission: environment:roles:manage-security-problems
Parameters
| Name | Type | Description |
|---|---|---|
| config.body*required | SecurityProblemUnmute | |
| config.id*required | string | The ID of the requested security problem. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The security problem has been un-muted. |
| void | 204 | Not executed. The security problem is already un-muted. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | AbstractSloAlertDto | |
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
| config.id*required | string | The ID of the required SLO. |
| config.timeFrame | "CURRENT" | "GTF" | The timeframe to calculate the SLO values:
If not set, the |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| EntityShortRepresentation | 201 | Success. 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 Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type |
|---|---|
| config.body*required | SloConfigItemDtoImpl |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 201 | Success. 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 Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
Deletes an SLO
Required scope: environment-api:slo:write One of the following permissions is required:
- environment:roles:manage-settings
- settings:objects:write
Parameters
| Name | Type |
|---|---|
| config.id*required | string |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The SLO has been deleted. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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:
- Set the timeFrame parameter to
GTF. - Provide the timeframe in from and to parameters.
Parameters
| Name | Type | Description |
|---|---|---|
| config.demo | boolean | Get 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.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
| config.nextPageKey | string | 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.pageSize | number | The amount of SLOs in a single response payload. The maximal allowed page size is 10000. If not set, 10 is used. |
| config.showGlobalSlos | boolean | Get your global SLOs (true) regardless of the selected filter or filter them out (false).Default: true |
| config.sloSelector | string | 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.
To set several criteria, separate them with comma (
The special characters |
| config.sort | string | The sorting of SLO entries:
If not set, the ascending order is used. Default: name |
| config.timeFrame | "CURRENT" | "GTF" | The timeframe to calculate the SLO values:
If not set, the |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SLOs | 200 | Success. The response contains the parameters and calculated values of the requested SLO. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.from | string | The start of the requested timeframe. You can use one of the following formats:
If not set, the relative timeframe of two weeks is used ( |
| config.id*required | string | The ID of the required SLO. |
| config.timeFrame | "CURRENT" | "GTF" | The timeframe to calculate the SLO values:
If not set, the |
| config.to | string | The end of the requested timeframe. You can use one of the following formats:
If not set, the current timestamp is used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SLO | 200 | Success. The response contains the parameters and calculated values of the requested SLO. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | SloConfigItemDtoImpl | |
| config.id*required | string | The ID of the required SLO. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.objectId*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| ManagementZoneDetails | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | AccessorPermissions | |
| config.objectId*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AccessorPermissions | 201 | Created |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | If 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
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | string | The ID of the required settings object. |
| config.updateToken | string | 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 type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| SettingsObjectResponseError | Failed. Schema validation failed. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource. |
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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.fields | string | 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, Supported fields: Default: origin,value |
| config.nextPageKey | string | 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.pageSize | number | The amount of settings objects in a single response payload. The maximal allowed page size is 500. If not set, 100 is used. |
| config.schemaIds | string | 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.scope | string | The scope that the requested objects target. The selection only matches objects directly targeting the specified scope. For example, To load the first page, when the nextPageKey is not set, this parameter is required. |
Returns
| Return type | Status code | Description |
|---|---|---|
| EffectiveSettingsValuesList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getEffectiveSettingsValues();
getPermission
Get current permissions of the accessor on this object.
Required scope: settings:objects:read
Get current permissions of the accessor on this object.
Parameters
| Name | Type | Description |
|---|---|---|
| config.accessorId*required | string | The user uuid or group uuid of the accessor, depending on the type. |
| config.accessorType*required | "group" | "user" | The type of the accessor. |
| config.adminAccess | boolean | If 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*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AccessorPermissions | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getPermission({
objectId: "...",
accessorType: "group",
accessorId: "...",
});
getPermissionAllUsers
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AccessorPermissions | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getPermissionAllUsers({
objectId: "...",
});
getPermissions
Get current permissions on this object.
Required scope: settings:objects:read
Get current permissions on this object.
Parameters
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| AccessorPermissionsList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getPermissions({
objectId: "...",
});
getSettingsHistory
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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.fields | string | A 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.filter | string | The filter parameter, as explained here. Filtering is supported on the following fields:
The fields can only be combined with |
| config.nextPageKey | string | 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.pageSize | number | The amount of settings objects in a single response payload. The maximal allowed page size is 500. If not set, 100 is used. |
| config.schemaId | string | 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.scope | string | The scope that the requested history objects target. The selection only matches revisions directly targeting the specified scope. For example, To load the first page, when the nextPageKey is not set, this parameter is required. |
| config.sort | string | The sort parameter, as explained here. Sorting is supported on the following fields:
|
Returns
| Return type | Status code | Description |
|---|---|---|
| RevisionDiffPage | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SettingsObjectByObjectIdResponse | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.getSettingsObjectByObjectId({
objectId: "...",
});
getSettingsObjects
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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.externalIds | string | 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.fields | string | 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, Supported fields: Default: objectId,value |
| config.filter | string | The filter parameter, as explained here. Filtering is supported on the following fields:
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 |
| config.nextPageKey | string | 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.pageSize | number | The amount of settings objects in a single response payload. The maximal allowed page size is 500. If not set, 100 is used. |
| config.schemaIds | string | 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.scopes | string | A list of comma-separated scopes, that the requested objects target. The selection only matches objects directly targeting the specified scopes. For example, 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.sort | string | The sort parameter, as explained here. Sorting is supported on the following fields:
Note that only fields included to the response via |
Returns
| Return type | Status code | Description |
|---|---|---|
| ObjectsList | 200 | Success. Accessible objects returned. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | Array<SettingsObjectCreate> | |
| config.validateOnly | boolean | If true, the request runs only validation of the submitted settings objects, without saving them.Default: false |
Returns
| Return type | Status code | Description |
|---|---|---|
| SettingsObjectResponse | 200 | Success |
| SettingsObjectResponse | 207 | Multi-status: different objects in the payload resulted in different statuses. |
Throws
| Error Type | Error Message |
|---|---|
| SettingsObjectResponseArrayError | Failed. Schema validation failed. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource. |
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | SettingsObjectUpdate | |
| config.objectId*required | string | The ID of the required settings object. |
| config.validateOnly | boolean | If true, the request runs only validation of the submitted settings object, without saving it.Default: false |
Returns
| Return type | Status code | Description |
|---|---|---|
| SettingsObjectResponse | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| SettingsObjectResponseError | Failed. Schema validation failed. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource. |
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.accessorId*required | string | The user uuid or group uuid of the accessor, depending on the type. |
| config.accessorType*required | "group" | "user" | The type of the accessor. |
| config.adminAccess | boolean | If 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*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.removePermission({
objectId: "...",
accessorType: "group",
accessorId: "...",
});
removePermissionAllUsers
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | 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.removePermissionAllUsers({
objectId: "...",
});
resolveEffectivePermissions
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
| Name | Type |
|---|---|
| config.body*required | ResolutionRequest |
Returns
| Return type | Status code | Description |
|---|---|---|
| EffectivePermission | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | TransferOwnershipRequest | |
| config.objectId*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.accessorId*required | string | The user uuid or group uuid of the accessor, depending on the type. |
| config.accessorType*required | "group" | "user" | The type of the accessor. |
| config.adminAccess | boolean | If 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*required | UpdatePermissionsRequest | |
| config.objectId*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | If 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
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
| Name | Type | Description |
|---|---|---|
| config.adminAccess | boolean | If 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*required | UpdatePermissionsRequest | |
| config.objectId*required | string | The ID of the required settings object. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | If 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
Lists available settings schemas
Required scope: settings:schemas:read One of the following permissions is required:
- environment:roles:manage-settings
- settings:schemas:read
Parameters
| Name | Type | Description |
|---|---|---|
| config.fields | string | 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, Supported fields: Default: schemaId,displayName,latestSchemaVersion |
Returns
| Return type | Status code | Description |
|---|---|---|
| SchemaList | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { settingsSchemasClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await settingsSchemasClient.getAvailableSchemaDefinitions();
getSchemaDefinition
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
| Name | Type | Description |
|---|---|---|
| config.schemaId*required | string | The ID of the required schema. |
| config.schemaVersion | string | The version of the required schema. If not set, the most recent version is returned. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SchemaDefinitionRestDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.locationId | string | Filters the results to those executed by specified Synthetic location. Specify the ID of the location. |
| config.monitorId*required | string | Identifier 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 type | Status code | Description |
|---|---|---|
| MonitorExecutionResults | 200 | Success. The response contains detailed data. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Creates a new private synthetic location
Required scope: environment-api:synthetic:write Required permission: environment:roles:manage-settings
Parameters
| Name | Type |
|---|---|
| config.body*required | PrivateSyntheticLocation |
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticLocationIdsDto | 201 | Success. The private location has been created. The response contains the ID of the new location. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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 type | Status code | Description |
|---|---|---|
| SyntheticConfigDto | 200 | Success. The response contains synthetic related parameters defined for whole tenant. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getConfiguration();
getLocation
Gets properties of the specified location
Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings
Parameters
| Name | Type | Description |
|---|---|---|
| config.locationId*required | string | The Dynatrace entity ID of the required location. |
Returns
| Return type | Status code | Description |
|---|---|---|
| PrivateSyntheticLocation | 200 | Success. The response contains parameters of the synthetic location. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getLocation(
{ locationId: "..." },
);
getLocationDeploymentApplyCommands
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
| Name | Type | Description |
|---|---|---|
| config.filename | string | Filename |
| config.fipsMode | string | Fips mode, accepted values are: DISABLED, ENABLED, ENABLED_WITH_CORPORATE_PROXY. Default value is DISABLED. |
| config.namespace | string | Namespace |
| config.platform | string | Container platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES. |
| config.squidProxyConfig | string | Optional configuration for Squid corporate proxy. If not provided the default value will be used. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the list of commands that needs to be executed to deploy a synthetic location. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentApplyCommands();
getLocationDeploymentDeleteCommands
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
| Name | Type | Description |
|---|---|---|
| config.filename | string | Filename |
| config.locationId*required | string | The Dynatrace entity ID of the required location. |
| config.namespace | string | Namespace |
| config.platform | string | Container platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the list of commands that needs to be executed to delete a synthetic location. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentDeleteCommands(
{ locationId: "..." },
);
getLocationDeploymentYaml
Gets yaml file content to deploy location in Kubernetes/Openshift cluster
Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings
Parameters
| Name | Type | Description |
|---|---|---|
| config.activeGateName | string | Active gate name |
| config.customRegistry | string | Custom images registry prefix - this will replace 'dynatrace' in image URLs in generated yaml. |
| config.locationId*required | string | The Dynatrace entity ID of the required location. |
| config.namespace | string | Namespace |
| config.tagVersionActiveGate | string | Custom version tag for Active Gate - this will be used as desired Active Gate version in generated yaml. |
| config.tagVersionSynthetic | string | Custom version tag for Synthetic- this will be used as desired Synthetic version in generated yaml |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the content of deployment yaml file. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getLocationDeploymentYaml(
{ locationId: "..." },
);
getLocations
Lists all synthetic locations (both public and private) available for your environment
Required scope: environment-api:synthetic:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| 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 type | Status code | Description |
|---|---|---|
| SyntheticLocations | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getLocations();
getLocationsStatus
Checks the status of public synthetic locations
Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticPublicLocationsStatus | 200 | Success. The response contains the public locations status. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getLocationsStatus();
getMetricAdapterDeploymentApplyCommands
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
| Name | Type | Description |
|---|---|---|
| config.filename | string | Filename |
| config.namespace | string | Namespace |
| config.platform | string | Container platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the list of commands that needs to be executed to deploy a metric adapter. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentApplyCommands();
getMetricAdapterDeploymentDeleteCommands
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
| Name | Type | Description |
|---|---|---|
| config.filename | string | Filename |
| config.platform | string | Container platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the list of commands that needs to be executed to delete a metric adapter. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentDeleteCommands();
getMetricAdapterDeploymentYaml
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
| Name | Type | Description |
|---|---|---|
| config.namespace | string | Namespace |
| config.platform | string | Container platform, currently supported are: KUBERNETES and OPENSHIFT. Default value is KUBERNETES. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 200 | Success. The response contains the content of deployment yaml file. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getMetricAdapterDeploymentYaml();
getNode
Lists properties of the specified synthetic node
Required scope: environment-api:synthetic:read Required permission: environment:roles:manage-settings
Parameters
| Name | Type | Description |
|---|---|---|
| config.nodeId*required | string | The ID of the required synthetic node. |
Returns
| Return type | Status code | Description |
|---|---|---|
| Node | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getNode(
{ nodeId: "..." },
);
getNodes
Lists all synthetic nodes available in your environment
Required scope: environment-api:synthetic:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.assignedToLocation | "TRUE" | "FALSE" | Filters the resulting set of nodes to those which are assigned to a synthetic location or not. |
| config.isContainerized | boolean | If set to true, returns only containerized nodes. |
Returns
| Return type | Status code | Description |
|---|---|---|
| Nodes | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.getNodes();
removeLocation
Deletes the specified private synthetic location
Required scope: environment-api:synthetic:write Required permission: environment:roles:manage-settings
Parameters
| Name | Type | Description |
|---|---|---|
| config.locationId*required | string | The Dynatrace entity ID of the private synthetic location to be deleted. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The location has been deleted. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticLocationsNodesAndConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticLocationsNodesAndConfigurationClient.removeLocation(
{ locationId: "..." },
);
updateConfiguration
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
| Name | Type |
|---|---|
| config.body*required | SyntheticConfigDto |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The set of synthetic related parameters has been updated. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
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
| Name | Type | Description |
|---|---|---|
| config.body*required | SyntheticLocationUpdate | |
| config.locationId*required | string | The Dynatrace entity ID of the synthetic location to be updated. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. The location has been updated. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Changes the status of public synthetic locations
Required scope: environment-api:synthetic:write Required permission: environment:roles:manage-settings
Parameters
| Name | Type |
|---|---|
| config.body*required | SyntheticPublicLocationsStatus |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. Locations status has been updated. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Creates a synthetic monitor definition. | maturity=EARLY_ADOPTER
Required scope: environment-api:synthetic-monitors:write Required permission: environment:roles:manage-settings
Parameters
| Name | Type |
|---|---|
| config.body*required | SyntheticBrowserMonitorRequest | SyntheticHttpMonitorRequest | SyntheticMultiProtocolMonitorRequest |
Returns
| Return type | Status code | Description |
|---|---|---|
| MonitorEntityIdDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticNetworkAvailabilityMonitorsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticNetworkAvailabilityMonitorsClient.createMonitor(
{},
);
deleteMonitor
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
| Name | Type | Description |
|---|---|---|
| config.monitorId*required | string | The identifier of the monitor. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticNetworkAvailabilityMonitorsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticNetworkAvailabilityMonitorsClient.deleteMonitor(
{ monitorId: "..." },
);
getMonitor
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
| Name | Type | Description |
|---|---|---|
| config.monitorId*required | string | The identifier of the monitor. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticHttpMonitorResponse | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticNetworkAvailabilityMonitorsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticNetworkAvailabilityMonitorsClient.getMonitor(
{ monitorId: "..." },
);
getMonitors
Gets all synthetic monitors. | maturity=EARLY_ADOPTER
Required scope: environment-api:synthetic-monitors:read Required permission: environment:roles:manage-settings
Parameters
| Name | Type | Description |
|---|---|---|
| config.monitorSelector | string | 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.
To set several criteria, separate them with a comma ( |
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticMonitorListDto | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client side error. | Server side error. |
Code example
import { syntheticNetworkAvailabilityMonitorsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await syntheticNetworkAvailabilityMonitorsClient.getMonitors();
updateMonitor
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
| Name | Type | Description |
|---|---|---|
| config.body*required | SyntheticBrowserMonitorRequest | SyntheticHttpMonitorRequest | SyntheticMultiProtocolMonitorRequest | |
| config.monitorId*required | string | The identifier of the monitor. |
Returns
| Return type | Status code | Description |
|---|---|---|
| void | 204 | Success. Response doesn't have a body. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Client 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
Triggers on-demand executions for synthetic monitors
Required scope: environment-api:synthetic-execution:write Required permission: environment:roles:viewer
Parameters
| Name | Type |
|---|---|
| config.body*required | SyntheticOnDemandExecutionRequest |
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticOnDemandExecutionResult | 201 | Success. The monitor's execution response details |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
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
| Name | Type | Description |
|---|---|---|
| config.batchId*required | number | The batch identifier of the executions. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticOnDemandBatchStatus | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
Gets basic results of the specified on-demand execution
Required scope: environment-api:synthetic-execution:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.executionId*required | number | The identifier of the on-demand execution. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticOnDemandExecution | 200 | Success. The response contains basic information about the on-demand execution. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
Gets detailed results of the specified on-demand execution
Required scope: environment-api:synthetic-execution:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.executionId*required | number | The identifier of the on-demand execution. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticOnDemandExecution | 200 | Success. The response contains detailed information about the on-demand execution. |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
Gets the list of all on-demand executions of synthetic monitors
Required scope: environment-api:synthetic-execution:read Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.batchId | number | Filters the resulting set of the executions by batch. Specify the ID of the batch. |
| config.dataDeliveryFrom | string | The start of the requested timeframe for data delivering timestamps. You can use one of the following formats:
If not set, the maximum relative timeframe of six hours is used ( |
| config.dataDeliveryTo | string | The end of the requested timeframe for data delivering timestamps. You can use one of the following formats:
If not set, the current timestamp is used. |
| config.executionFrom | string | The start of the requested timeframe for execution timestamps. You can use one of the following formats:
If not set, the maximum relative timeframe of six hours is used ( |
| config.executionStage | "TRIGGERED" | "EXECUTED" | "DATA_RETRIEVED" | Filters the resulting set of executions by their stage. |
| config.executionTo | string | The end of the requested timeframe for execution timestamps. You can use one of the following formats:
If not set, the current timestamp is used. |
| config.locationId | string | Filters the resulting set of the executions by Synthetic location. Specify the ID of the location. |
| config.monitorId | string | Filters the resulting set of the executions by monitor synthetic monitor. Specify the ID of the monitor. |
| config.schedulingFrom | string | The start of the requested timeframe for scheduling timestamps. You can use one of the following formats:
If not set, the maximum relative timeframe of six hours is used ( |
| config.schedulingTo | string | The end of the requested timeframe for scheduling timestamps. You can use one of the following formats:
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.userId | string | Filters the resulting set of executions by scheduled user. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticOnDemandExecutions | 200 | Success |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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
Reruns specified on-demand execution of synthetic monitors
Required scope: environment-api:synthetic-execution:write Required permission: environment:roles:viewer
Parameters
| Name | Type | Description |
|---|---|---|
| config.executionId*required | number | The identifier of the on-demand execution. |
Returns
| Return type | Status code | Description |
|---|---|---|
| SyntheticOnDemandExecutionResult | 200 | Success. The monitor's execution response details |
Throws
| Error Type | Error Message |
|---|---|
| ErrorEnvelopeError | Failed. 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,
});