Classic Environment V2
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.
To authorize, use a valid access token or personal access token. For usage in a Dynatrace app, refer to the Dynatrace Developer 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
Required permission: environment:roles:manage-settings
The newly created token will be owned by the same user who owns the token used for authentication of the call.
Parameters
Name | Type |
---|---|
config.body*required | ActiveGateTokenCreate |
Returns
Success. The token has been created. The body of the response contains the token secret.
Code example
import { accessTokensActiveGateTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensActiveGateTokensClient.createToken({
body: { name: "myToken" },
});
getToken
Gets metadata of an ActiveGate token
Required scope: environment-api:activegate-tokens:read Required permission: environment:roles:manage-settings
The token secret is not exposed.
Parameters
Name | Type | Description |
---|---|---|
config.activeGateTokenIdentifier*required | string | The ActiveGate token identifier, consisting of prefix and public part of the token. |
Returns
Success. The response contains the metadata of the tokens.
Code example
import { accessTokensActiveGateTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensActiveGateTokensClient.getToken({
activeGateTokenIdentifier: "...",
});
listTokens
Lists all available ActiveGate tokens
Required scope: environment-api:activegate-tokens:read Required permission: environment:roles:manage-settings
You can limit the output by using pagination:
- 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
Success. The response contains the list of ActiveGate tokens.
Code example
import { accessTokensActiveGateTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensActiveGateTokensClient.listTokens();
revokeToken
Deletes an ActiveGate token
Required scope: environment-api:activegate-tokens:write Required permission: environment:roles:manage-settings
Parameters
Name | Type | Description |
---|---|---|
config.activeGateTokenIdentifier*required | string | The ActiveGate token identifier, consisting of prefix and public part of the token to be deleted. |
Code example
import { accessTokensActiveGateTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensActiveGateTokensClient.revokeToken({
activeGateTokenIdentifier: "...",
});
accessTokensApiTokensClient
import { accessTokensApiTokensClient } from '@dynatrace-sdk/client-classic-environment-v2';
createApiToken
Creates a new API token
Required scope: environment-api:api-tokens:write Required permission: environment:roles:viewer
The newly created token will be owned by the same user who owns the token used for authentication of the call.
Creating personal access tokens requires the environment:roles:viewer
permission. Creating access tokens requires the environment:roles:manage-settings
permission.
Parameters
Name | Type |
---|---|
config.body*required | ApiTokenCreate |
Returns
Success. The token has been created. The body of the response contains the token secret.
Code example
import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensApiTokensClient.createApiToken({
body: { name: "tokenName", scopes: ["metrics.read"] },
});
deleteApiToken
Deletes an API token
Required scope: environment-api:api-tokens:write Required permission: environment:roles:viewer
Parameters
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. |
Code example
import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensApiTokensClient.deleteApiToken({
id: "...",
});
getApiToken
Gets API token metadata by token ID
Required scope: environment-api:api-tokens:read Required permission: environment:roles:viewer
The token secret is not exposed.
Parameters
Name | Type |
---|---|
config.id*required | string |
Returns
Success
Code example
import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await accessTokensApiTokensClient.getApiToken({
id: "...",
});
listApiTokens
Lists all available API tokens
Required scope: environment-api:api-tokens:read Required permission: environment:roles:viewer
You can limit the output by using pagination:
- 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. |
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
Success
Code example
import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensApiTokensClient.listApiTokens();
lookupApiToken
Gets API token metadata by token secret
Required scope: environment-api:api-tokens:read Required permission: environment:roles:viewer
Parameters
Name | Type |
---|---|
config.body*required | ApiTokenSecret |
Returns
Success
Code example
import { accessTokensApiTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensApiTokensClient.lookupApiToken({
body: {
token:
"dt0c01.ST2EY72KQINMH574WMNVI7YN.G3DFPBEJYMODIDAEX454M7YWBUVEFOWKPRVMWFASS64NFH52PX6BNDVFFM572RZM",
},
});
updateApiToken
Updates an API token
Required scope: environment-api:api-tokens:write Required permission: environment:roles:viewer
Parameters
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. |
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
Required scope: environment-api:tenant-token-rotation:write Required permission: environment:roles:manage-settings
To learn how to rotate tokens, see Token rotation in Dynatrace Documentation.
Returns
Success. Rotation process has been cancelled. The current tenant token remains valid.
Code example
import { accessTokensTenantTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensTenantTokensClient.cancelRotation();
finishRotation
Finishes tenant token rotation
Required scope: environment-api:tenant-token-rotation:write Required permission: environment:roles:manage-settings
To learn how to rotate tokens, see Token rotation in Dynatrace Documentation.
Returns
Success. The rotation process is completed. The active field of the response contains the new tenant token.
Code example
import { accessTokensTenantTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensTenantTokensClient.finishRotation();
startRotation
Starts tenant token rotation
Required scope: environment-api:tenant-token-rotation:write Required permission: environment:roles:manage-settings
To learn how to rotate tokens, see Token rotation in Dynatrace Documentation.
Returns
Success. The new tenant token is created and will replace the old one. The active field of the response contains the new tenant token.
Code example
import { accessTokensTenantTokensClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await accessTokensTenantTokensClient.startRotation();
activeGatesAutoUpdateConfigurationClient
import { activeGatesAutoUpdateConfigurationClient } from '@dynatrace-sdk/client-classic-environment-v2';
getAutoUpdateConfigById
Gets the configuration of auto-update for the specified ActiveGate
Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings
Parameters
Name | Type | Description |
---|---|---|
config.agId*required | string | The ID of the required ActiveGate. |
Returns
Success
Code example
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesAutoUpdateConfigurationClient.getAutoUpdateConfigById(
{ agId: "..." },
);
getGlobalAutoUpdateConfigForTenant
Gets the global auto-update configuration of environment ActiveGates.
Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings
Returns
Success
Code example
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesAutoUpdateConfigurationClient.getGlobalAutoUpdateConfigForTenant();
putAutoUpdateConfigById
Updates the configuration of auto-update for the specified ActiveGate
Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings
Parameters
Name | Type | Description |
---|---|---|
config.agId*required | string | The ID of the required ActiveGate. |
config.body*required | ActiveGateAutoUpdateConfig |
Code example
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesAutoUpdateConfigurationClient.putAutoUpdateConfigById(
{ agId: "...", body: {} },
);
putGlobalAutoUpdateConfigForTenant
Puts the global auto-update configuration of environment ActiveGates.
Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings
Parameters
Name | Type |
---|---|
config.body*required | ActiveGateGlobalAutoUpdateConfig |
Code example
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesAutoUpdateConfigurationClient.putGlobalAutoUpdateConfigForTenant(
{ body: {} },
);
validateAutoUpdateConfigById
Validates the payload for the POST /activeGates/{agId}/autoUpdate
request.
Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings
Parameters
Name | Type | Description |
---|---|---|
config.agId*required | string | The ID of the required ActiveGate. |
config.body*required | ActiveGateAutoUpdateConfig |
Code example
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesAutoUpdateConfigurationClient.validateAutoUpdateConfigById(
{ agId: "...", body: {} },
);
validateGlobalAutoUpdateConfigForTenant
Validates the payload for the POST /activeGates/autoUpdate
request.
Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings
Parameters
Name | Type |
---|---|
config.body*required | ActiveGateGlobalAutoUpdateConfig |
Code example
import { activeGatesAutoUpdateConfigurationClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesAutoUpdateConfigurationClient.validateGlobalAutoUpdateConfigForTenant(
{ body: {} },
);
activeGatesAutoUpdateJobsClient
import { activeGatesAutoUpdateJobsClient } from '@dynatrace-sdk/client-classic-environment-v2';
createUpdateJobForAg
Creates a new update job for the specified ActiveGate
Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings
Parameters
Name | Type | Description |
---|---|---|
config.agId*required | string | The ID of the required ActiveGate. |
config.body*required | UpdateJob |
Returns
Success. The update-job have been created.
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
Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings
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. |
Code example
import { activeGatesAutoUpdateJobsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await activeGatesAutoUpdateJobsClient.deleteUpdateJobByJobIdForAg(
{ agId: "...", jobId: "..." },
);
getAllUpdateJobList
List ActiveGates with update jobs
Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings
The response includes ActiveGates that have both completed (successful and failed) jobs and jobs in progress.
Parameters
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. |
config.startVersion | string | Filters the resulting set of update-jobs by the initial version (required format <major>.<minor>.<revision> ). |
config.startVersionCompareType | GetAllUpdateJobListQueryStartVersionCompareType | 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 | GetAllUpdateJobListQueryTargetVersionCompareType | 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 | GetAllUpdateJobListQueryUpdateType | Filters the resulting set of update-jobs by the update type. |
Returns
Success
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
Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings
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
Success
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
Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings
The job can update the ActiveGate to the specified version or the latest available one.
Parameters
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. |
config.startVersion | string | Filters the resulting set of update-jobs by the initial version (required format <major>.<minor>.<revision> ). |
config.startVersionCompareType | GetUpdateJobListByAgIdQueryStartVersionCompareType | 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 | GetUpdateJobListByAgIdQueryTargetVersionCompareType | 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 | GetUpdateJobListByAgIdQueryUpdateType | Filters the resulting set of update-jobs by the update type. |
Returns
Success
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.
Required scope: environment-api:activegates:write Required permission: environment:roles:manage-settings
Parameters
Name | Type | Description |
---|---|---|
config.agId*required | string | The ID of the required ActiveGate. |
config.body*required | UpdateJob |
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
Lists all available ActiveGates
Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings
The response includes all ActiveGates that are currently connected to the environment or have been connected during last 2 hours.
Parameters
Name | Type | Description |
---|---|---|
config.autoUpdate | GetAllActiveGatesQueryAutoUpdate | 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<GetAllActiveGatesQueryDisabledModuleItem> | Filters the resulting set of ActiveGates by the disabled modules. |
config.enabledModule | Array<GetAllActiveGatesQueryEnabledModuleItem> | Filters the resulting set of ActiveGates by the enabled modules. |
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 | GetAllActiveGatesQueryOsArchitecture | Filters the resulting set of ActiveGates by the OS architecture of the host it's running on. |
config.osType | GetAllActiveGatesQueryOsType | 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 | GetAllActiveGatesQueryTokenState | Filters the resulting set of ActiveGates to those with authorization token in specified state. |
config.type | GetAllActiveGatesQueryType | Filters the resulting set of ActiveGates by the ActiveGate type. |
config.updateStatus | GetAllActiveGatesQueryUpdateStatus | 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 | GetAllActiveGatesQueryVersionCompareType | Filters the resulting set of ActiveGates by the specified version. Specify the comparison operator here. |
Returns
Success
Code example
import { activeGatesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await activeGatesClient.getAllActiveGates();
getOneActiveGateById
Gets the details of the specified ActiveGate
Required scope: environment-api:activegates:read Required permission: environment:roles:manage-settings
Parameters
Name | Type | Description |
---|---|---|
config.agId*required | string | The ID of the required ActiveGate. |
Returns
Success
Code example
import { activeGatesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await activeGatesClient.getOneActiveGateById({
agId: "...",
});
attacksClient
import { attacksClient } from '@dynatrace-sdk/client-classic-environment-v2';
getAttack
Gets the specified attack
Required scope: environment-api:attacks:read One of the following permissions is required:
- environment:roles:manage-security-problems
- environment:roles:view-security-problems
Parameters
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
Success
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
Success
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
Success
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. |
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
Success
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
Required scope: storage:events:write Required permission: storage:events:write
The maximum payload size of a single request is 5 MiB. Requests with a greater payload are rejected, and the API returns a 413 response code.
The ingestion of business events is subject to licensing (see licensing documentation).
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
The provided business events are all accepted and will be processed.
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
Success. The new credentials set has been created. The response contains the ID of the set.
Code example
import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await credentialVaultClient.createCredentials({
body: {
name: "...",
scopes: [CredentialsScopesItem.AppEngine],
},
});
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
Success. The response contains the metadata of the credentials set.
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
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
Success. The response contains the details of the credentials set.
Code example
import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await credentialVaultClient.getCredentialsDetails({
id: "...",
});
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 | ListCredentialsQueryType | 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
Success
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. |
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
Success. The new credentials set has been created. The response contains the ID of the set.
Code example
import { credentialVaultClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await credentialVaultClient.updateCredentials({
id: "...",
body: {
name: "...",
scopes: [CredentialsScopesItem.AppEngine],
},
});
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
Success
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:
- storage:events:write
- environment-api:events:write
One of the following permissions is required:
- environment:roles:viewer
- storage:events:write
The ingestion of custom events is subject to licensing (see licensing documentation).
Parameters
Name | Type |
---|---|
config.body*required | EventIngest |
Returns
The event ingest request was received by the server. The response body indicates for each event whether its creation was successful.
Code example
import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await eventsClient.createEvent({
body: { 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
Success. The response contains the configuration of the event.
Code example
import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await eventsClient.getEvent({
eventId: "...",
});
getEventProperties
Lists all event properties
Required scope: environment-api:events: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. |
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
Success
Code example
import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await eventsClient.getEventProperties();
getEventProperty
Gets the details of an event property
Required scope: environment-api:events:read Required permission: environment:roles:viewer
Parameters
Name | Type | Description |
---|---|---|
config.propertyKey*required | string | The event property key you're inquiring. |
Returns
Success
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
Required scope: environment-api:events:read Required permission: environment:roles:viewer
Parameters
Name | Type | Description |
---|---|---|
config.eventType*required | string | The event type you're inquiring. |
Returns
Success
Code example
import { eventsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await eventsClient.getEventType({
eventType: "...",
});
getEventTypes
Lists all event types
Required scope: environment-api:events: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. |
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
Success
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
Success. The response contains the list of events.
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
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
Parameters
Name | Type | Description |
---|---|---|
config.body*required | ExtensionEnvironmentConfigurationVersion | |
config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
Success. Environment configuration created.
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
Parameters
Name | Type | Description |
---|---|---|
config.body*required | Array<MonitoringConfigurationDto> | |
config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
Success | Multi-Status, if not all requests resulted in the same status
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. |
deleteEnvironmentConfiguration
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
Parameters
Name | Type | Description |
---|---|---|
config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
Success. Environment configuration deactivated.
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.deleteEnvironmentConfiguration(
{ extensionName: "..." },
);
executeExtensionMonitoringConfigurationActions
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
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
Accepted. Response doesn't have a body.
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.executeExtensionMonitoringConfigurationActions(
{
extensionName: "...",
configurationId: "...",
body: {},
},
);
extensionConfigurationSchema
Gets the configuration schema of the specified version of the extension 2.0
Required scope: environment-api:extension-configurations:read One of the following permissions is required:
- environment:roles:manage-settings
- extensions:definitions:read
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 |
Returns
Success
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
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 |
Returns
Success
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" | |
config.extensionName*required | string | The name of the requested extension 2.0. |
config.extensionVersion*required | string | The version of the requested extension 2.0 |
extensionMonitoringConfigurations
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
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
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.extensionMonitoringConfigurations(
{ extensionName: "..." },
);
getActiveEnvironmentConfiguration
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
Parameters
Name | Type | Description |
---|---|---|
config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.getActiveEnvironmentConfiguration(
{ extensionName: "..." },
);
getActiveGateGroupsInfo
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
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 |
Returns
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.getActiveGateGroupsInfo({
extensionName: "...",
extensionVersion: "...",
});
getEnvironmentConfigurationAssetsInfo
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
Parameters
Name | Type | Description |
---|---|---|
config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.getEnvironmentConfigurationAssetsInfo(
{ extensionName: "..." },
);
getEnvironmentConfigurationEvents
List of the latest extension environment configuration events
Required scope: environment-api:extensions:read One of the following permissions is required:
- environment:roles:manage-settings
- extensions:definitions:read
Parameters
Name | Type | Description |
---|---|---|
config.content | string | Content of the event |
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 hours is used ( |
config.status | GetEnvironmentConfigurationEventsQueryStatus | Status of the event |
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
List of the latest extension environment configuration events
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.getEnvironmentConfigurationEvents(
{ extensionName: "..." },
);
getExtensionMonitoringConfigurationEvents
Gets the list of the events linked to specific monitoring configuration
Required scope: environment-api:extension-configurations:read One of the following permissions is required:
- environment:roles:manage-settings
- extensions:configurations:read
Parameters
Name | Type | Description |
---|---|---|
config.configurationId*required | string | The ID of the requested monitoring configuration. |
config.content | string | Content of the event |
config.dtActiveGateId | string | Hexadecimal ID of Active Gate that uses this monitoring configuration. Example: |
config.dtEntityHost | string | Host that uses this monitoring configuration. Example: |
config.dtExtensionDs | string | Data source that uses this monitoring configuration. Example: |
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 hours is used ( |
config.status | GetExtensionMonitoringConfigurationEventsQueryStatus | Status of the event |
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
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.getExtensionMonitoringConfigurationEvents(
{ extensionName: "...", configurationId: "..." },
);
getExtensionMonitoringConfigurationStatus
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
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
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.getExtensionMonitoringConfigurationStatus(
{ extensionName: "...", configurationId: "..." },
);
getSchemaFile
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
Parameters
Name | Type | Description |
---|---|---|
config.fileName*required | string | The name of the schema file. |
config.schemaVersion*required | string | The version of the schema. |
Returns
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await extensions_2_0Client.getSchemaFile({
schemaVersion: "...",
fileName: "...",
});
installExtension
Installs Extension from HUB
Required scope: environment-api:extensions:write One of the following permissions is required:
- environment:roles:manage-settings
- extensions:definitions:write
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
Success. The extension 2.0 has been uploaded.
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await extensions_2_0Client.installExtension({
extensionName: "...",
});
listExtensionInfos
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
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
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.listExtensionInfos();
listExtensionVersions
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
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
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.listExtensionVersions({
extensionName: "...",
});
listExtensions
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
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
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await extensions_2_0Client.listExtensions();
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
Parameters
Name | Type | Description |
---|---|---|
config.acceptType*required | "application/json; charset=utf-8" | |
config.schemaVersion*required | string | The version of the schema. |
Returns
Success
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. |
listSchemas
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
Returns
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await extensions_2_0Client.listSchemas();
monitoringConfigurationDetails
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
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
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.monitoringConfigurationDetails(
{ extensionName: "...", configurationId: "..." },
);
removeExtension
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
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 |
Returns
Success. The extension 2.0 version has been deleted.
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await extensions_2_0Client.removeExtension({
extensionName: "...",
extensionVersion: "...",
});
removeMonitoringConfiguration
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
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. |
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.removeMonitoringConfiguration({
extensionName: "...",
configurationId: "...",
});
updateExtensionEnvironmentConfiguration
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
Parameters
Name | Type | Description |
---|---|---|
config.body*required | ExtensionEnvironmentConfigurationVersion | |
config.extensionName*required | string | The name of the requested extension 2.0. |
Returns
Success. Environment configuration updated.
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
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
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
Success
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await extensions_2_0Client.updateMonitoringConfiguration({
extensionName: "...",
configurationId: "...",
body: {},
});
uploadExtension
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
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. |
Returns
The extension is valid | Success. The extension 2.0 has been uploaded.
Code example
import { extensions_2_0Client } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await extensions_2_0Client.uploadExtension({
body: new Blob(),
});
logsClient
import { logsClient } from '@dynatrace-sdk/client-classic-environment-v2';
exportLogRecords
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.
Disabled on Log Management and Analytics, powered by Grail.
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. |
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). |
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
Success
Code example
import { logsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await logsClient.exportLogRecords();
getLogHistogramData
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 bearer OAuth token (with storage:logs:read and storage:buckets:read scopes) needs to be used for authentication.
Please note that Dynatrace API explorer does not currently support OAuth authentication.
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. |
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. |
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
Success
Code example
import { logsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await logsClient.getLogHistogramData();
getLogRecords
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 bearer OAuth token (with storage:logs:read and storage:buckets:read scopes) needs to be used for authentication.
Please note that Dynatrace API explorer does not currently support OAuth authentication.
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. |
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). |
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
Success
Code example
import { logsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await logsClient.getLogRecords();
storeLog
Pushes log records to Dynatrace
Required scope: storage:logs:write Required permission: storage:logs:write
Ingested logs are stored in the indexed log storage.
This endpoint requires an ActiveGate with the Log Analytics Collector module enabled.
The maximum payload size of a single request is 5 MB. Requests with a greater payload are rejected, and the API returns a 413 response code.
If the ingested payload is a JSON array, the maximum array size is 50000. Requests with a greater payload are rejected, and the API returns a 413 response code.
Log events per minute (SaaS):
Grail tenants: no limit, other tenants: 1M per minute by default.
If your log data stream within your cluster exceeds the limit, all log events above the limit are ignored.
Log events per minute (Managed):
1k/minute per cluster by default.
If your log data stream within your cluster exceeds the limit, all log events above the limit are ignored.
If you increase resources (RAM) in your nodes, you can increase the limit based on the cluster resources size using an API call or Cluster Management Console (CMC).
Refresh cluster limit using the API call
See Update log events per cluster for Log Monitoring.
Refresh cluster limit using Cluster Management Console (CMC)
-
In the CMC, select Environments and the environment for which you wish to update the total log events per cluster.
-
On the environment details page, in the Cluster overload prevention settings section, select the Refresh cluster limit.
High-cardinality attributes:
Unique log data attributes (high-cardinality attributes) such as span_id
and trace_id
generate unnecessarily excessive facet lists that may impact log viewer performance. Because of this, they aren't listed in log viewer facets. You can still use them in a log viewer advanced search query.
Parameters
Name | Type |
---|---|
config.body*required | LogMessageJson | LogMessagePlain |
config.type*required | "application/json" | "application/json; charset=utf-8" | "text/plain; charset=utf-8" |
Returns
Only a part of input events were ingested due to event invalidity. For details, check the response body.
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: "2022-01-17T22:12:31.0000",
severity: "error",
"custom.attribute": "attribute value",
},
{
content:
"Exception: Custom error log sent via Generic Log Ingest",
"log.source": "/var/log/syslog",
timestamp: "2022-01-17T22:12:35.0000",
},
{
content:
"Exception: Custom error log sent via Generic Log Ingest",
"log.source": "/var/log/syslog",
},
{
content:
"Exception: Custom error log sent via Generic Log Ingest",
},
],
});
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:
|
Returns
Success
Code example
import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await metricsClient.allMetrics({
acceptType: "application/json; charset=utf-8",
});
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. |
Code example
import { metricsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await metricsClient.delete({
metricKey: "...",
});
ingest
Pushes metric data points to Dynatrace
Required scope: storage:metrics:write Required permission: storage:metrics:write
Parameters
Name | Type |
---|---|
config.body*required | string |
Returns
The provided metric data points are accepted and will be processed in the background.
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
Success
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:
|
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
Success
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
Success
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
Success
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
Success
Code example
import { metricsUnitsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await metricsUnitsClient.unit({
unitId: "...",
});
monitoredEntitiesClient
import { monitoredEntitiesClient } from '@dynatrace-sdk/client-classic-environment-v2';
deleteSecurityContext
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
Success
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
Success
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
Success
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
Success
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
Success
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
Success
Code example
import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await monitoredEntitiesClient.pushCustomDevice(
{ body: { customDeviceId: "...", displayName: "..." } },
);
setSecurityContext
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
Success
Code example
import { monitoredEntitiesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await monitoredEntitiesClient.setSecurityContext({
entitySelector: "...",
body: {},
});
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
Success
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
Success
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
Success
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.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. |
Returns
Success
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
Updates an existing network zone or creates a new one
Required scope: environment-api:network-zones:write Required permission: environment:roles:manage-settings
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.
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
Success. The new network zone has been created. The response body contains the ID of the new network zone.
Code example
import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await networkZonesClient.createOrUpdateNetworkZone({
id: "...",
body: {},
});
deleteNetworkZone
Deletes the specified network zone
Required scope: environment-api:network-zones:write Required permission: environment:roles:manage-settings
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.
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | The ID of the network zone to be deleted. |
Code example
import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await networkZonesClient.deleteNetworkZone({
id: "...",
});
getAllNetworkZones
Lists all existing network zones
Required scope: environment-api:network-zones:read Required permission: environment:roles:viewer
Returns
Success
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
Required scope: environment-api:network-zones:read Required permission: environment:roles:manage-settings
Parameters
Name | Type | Description |
---|---|---|
config.filter | GetHostStatsQueryFilter | Filters the resulting set of hosts:
If not set, |
config.id*required | string | The ID of the required network zone. |
Returns
Success
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
Required scope: environment-api:network-zones:read Required permission: environment:roles:viewer
Returns
Success
Code example
import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await networkZonesClient.getNetworkZoneSettings();
getSingleNetworkZone
Gets parameters of the specified network zone
Required scope: environment-api:network-zones:read Required permission: environment:roles:viewer
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | The ID of the required network zone. |
Returns
Success
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
Required scope: environment-api:network-zones:write Required permission: environment:roles:manage-settings
Parameters
Name | Type |
---|---|
config.body*required | NetworkZoneSettings |
Code example
import { networkZonesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await networkZonesClient.updateNetworkZoneSettings({
body: {},
});
problemsClient
import { problemsClient } from '@dynatrace-sdk/client-classic-environment-v2';
closeProblem
Closes the specified problem and adds a closing comment on it
Required scope: environment-api:problems:write Required permission: environment:roles:viewer
Parameters
Name | Type | Description |
---|---|---|
config.body*required | ProblemCloseRequestDtoImpl | |
config.problemId*required | string | The ID of the required problem. |
Returns
Success
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. |
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. |
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
Success
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
Success
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
Success
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
Success
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. |
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 ). |
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. |
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
Success
Code example
import { releasesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await releasesClient.getReleases();
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
Success. The remediation item(s) have been muted.
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.bulkMuteRemediationItems({
id: "...",
body: { 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
Success. The security problem(s) have been muted.
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.bulkMuteSecurityProblems({
body: { 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
Success. The remediation item(s) have been un-muted.
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.bulkUnmuteRemediationItems({
id: "...",
body: { 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
Success. The security problem(s) have been un-muted.
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.bulkUnmuteSecurityProblems({
body: { 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
Success. The response contains the list of security problem events.
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
Success. The response contains details of a single remediation item of a security problem.
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
Success. The response contains the list of remediation items of a problem.
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
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.
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
Success. The response contains parameters of the security problem.
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
Success. The response contains the list of security problems.
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
Success. The response contains the list of vulnerable functions.
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. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.muteSecurityProblem({
id: "...",
body: {},
});
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. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.setRemediationItemMuteState({
id: "...",
remediationItemId: "...",
body: { comment: "...", muted: false },
});
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. |
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. |
Code example
import { securityProblemsClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data =
await securityProblemsClient.unmuteSecurityProblem({
id: "...",
body: {},
});
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 | CreateAlertQueryTimeFrame | 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
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.
Code example
import { serviceLevelObjectivesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await serviceLevelObjectivesClient.createAlert(
{
id: "...",
body: { alertName: "...", alertThreshold: 10 },
},
);
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 |
Code example
import { serviceLevelObjectivesClient } from "@dynatrace-sdk/client-classic-environment-v2";
const data = await serviceLevelObjectivesClient.createSlo({
body: {
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 |
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 ). |
config.enabledSlos | GetSloQueryEnabledSlos | Get your enabled SLOs (true ), disabled ones (false ) or both enabled and disabled ones (all ). |
config.evaluate | GetSloQueryEvaluate | 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 ). |
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.
|