@dynatrace-sdk/client-app-settings

中文文档
1.10.0发布于 2026/11/03Apache-2.0TypeScriptESM + CJS近 30 天下载 1.4万

Retrieve, update and manage app settings.

原始使用文档
文档目录37 节
  1. Installation
  2. Getting help
  3. License
  4. appSettingsObjectsClient
  5. deleteAppSettingsObjectByObjectId
  6. getAppSettingsObjectByObjectId
  7. getAppSettingsObjects
  8. getEffectiveAppSettingsValues
  9. postAppSettingsObject
  10. putAppSettingsObjectByObjectId
  11. resolveEffectivePermissions
  12. Types
  13. AppSettingsError
  14. AppSettingsErrorDetails
  15. AppSettingsErrorEnvelope
  16. AppSettingsErrorIncomplete
  17. AppSettingsModificationInfo
  18. AppSettingsObject
  19. AppSettingsObjectCreate
  20. AppSettingsObjectResponse
  21. AppSettingsObjectUpdate
  22. AppSettingsObjectsList
  23. ConstraintViolation
  24. EffectiveAppSettingsValue
  25. EffectiveAppSettingsValuesList
  26. EffectivePermission
  27. EffectivePermissions
  28. Modifications
  29. PermissionContext
  30. ResolutionRequest
  31. ResourceContext
  32. SinglePermissionRequest
  33. Enums
  34. ConstraintViolationParameterLocation
  35. EffectivePermissionGranted
  36. ResourceContextOperationsItem
  37. SinglePermissionRequestPermission

@dynatrace-sdk/client-app-settings

npm License

This API version is already deprecated. Please use v2 instead. A migration guide can be found here.
Retrieve, update and manage app settings.

Installation

npm install @dynatrace-sdk/client-app-settings

Getting help

License

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

API reference

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

appSettingsObjectsClient

import { appSettingsObjectsClient } from '@dynatrace-sdk/client-app-settings';

deleteAppSettingsObjectByObjectId

⚠️ Deprecated

appSettingsObjectsClient.deleteAppSettingsObjectByObjectId(config): Promise<void>

Deletes the specified settings object

Required scope: app-settings:objects:write Required permission: app-settings:objects:write

Parameters

NameTypeDescription
config.objectId*requiredstringThe ID of the required settings object.
config.optimisticLockingVersion*requiredstring

The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.

It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.

Returns

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

Throws

Error TypeError Message
AppSettingsErrorEnvelopeErrorFailed. The input is invalid. | Failed. Forbidden. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource.
Code example
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";

const data =
  await appSettingsObjectsClient.deleteAppSettingsObjectByObjectId(
    { objectId: "...", optimisticLockingVersion: "..." },
  );

getAppSettingsObjectByObjectId

⚠️ Deprecated

appSettingsObjectsClient.getAppSettingsObjectByObjectId(config): Promise<AppSettingsObject>

Gets the specified settings object

Required scope: app-settings:objects:read Required permission: app-settings:objects:read

Gets the specified settings object. Properties of type secret will be included in plain text if the call originates from a serverless function of your app; they will have irreversibly masked values otherwise. This protects these secrets from leaking to users of your app or other third parties.

Parameters

NameTypeDescription
config.objectId*requiredstringThe ID of the required settings object.

Returns

Return typeStatus codeDescription
AppSettingsObject200Success

Throws

Error TypeError Message
AppSettingsErrorEnvelopeErrorFailed. The input is invalid. | Failed. Forbidden. | No object available for the given objectId
Code example
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";

const data =
  await appSettingsObjectsClient.getAppSettingsObjectByObjectId(
    { objectId: "..." },
  );

getAppSettingsObjects

⚠️ Deprecated

appSettingsObjectsClient.getAppSettingsObjects(config): Promise<AppSettingsObjectsList>

Lists persisted settings objects

Required scope: app-settings:objects:read Required permission: app-settings:objects:read

Lists persisted settings objects for selected schemas.

If nothing is persisted or if all persisted settings objects are not accessible due to missing permissions, no items will be returned.

To query the effective values (including schema defaults) please see getEffectiveAppSettingsValues.

Properties of type secret will be included in plain text if the call originates from a serverless function of your app; they will have irreversibly masked values otherwise. This protects these secrets from leaking to users of your app or other third parties.

Parameters

NameTypeDescription
config.addFieldsstring

A list of fields to be included to the response. The provided set of fields extends the default set.

Specify the required top-level fields, separated by commas (for example, summary,value).

Supported fields: objectId, version, summary, searchSummary, schemaId, schemaVersion, modificationInfo, resourceContext, value.

Default fields: objectId, version.



Default: objectId, version
config.pageKeystring

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 page-key query parameter.

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

config.pageSizenumber

The amount of settings objects in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

config.schemaIdsstring

A list of comma-separated schema IDs to which the requested objects belong.

To load the first page, when the nextPageKey is not set, this parameter is required.

Returns

Return typeStatus codeDescription
AppSettingsObjectsList200Success. Accessible objects returned.

Even if a response returns a successful response code it is possible that the result is incomplete due to an internal error.

In this case an 'error' property with information about the problem is added. The caller may decide to work with the incomplete result or do a retry of the operation.|

Throws

Error TypeError Message
AppSettingsErrorEnvelopeErrorFailed. The input is invalid. | Failed. Forbidden. | Failed. The specified schema was not found.
Code example
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";

const data =
  await appSettingsObjectsClient.getAppSettingsObjects();

getEffectiveAppSettingsValues

⚠️ Deprecated

appSettingsObjectsClient.getEffectiveAppSettingsValues(config): Promise<EffectiveAppSettingsValuesList>

Lists effective settings values

Required scope: app-settings:objects:read Required permission: app-settings:objects:read

Lists effective settings values for selected schemas. If no object is persisted for a schema with "multiObject": false, the default value as defined in the schema will be returned.

Properties of type secret will be included in plain text if the call originates from a serverless function of your app; they will have irreversibly masked values otherwise. This protects these secrets from leaking to users of your app or other third parties.

Parameters

NameTypeDescription
config.addFieldsstring

A list of fields to be included to the response. The provided set of fields extends the default set.

Specify the required top-level fields, separated by commas (for example, summary,schemaId).

Supported fields: summary, searchSummary, schemaId, schemaVersion, modificationInfo, value.

Default fields: value.



Default: value
config.pageKeystring

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 page-key query parameter.

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

config.pageSizenumber

The amount of settings objects in a single response payload.

The maximal allowed page size is 500.

If not set, 100 is used.

config.schemaIdsstring

A list of comma-separated schema IDs to which the requested objects belong.

Only considered on load of the first page, when the nextPageKey is not set.

Returns

Return typeStatus codeDescription
EffectiveAppSettingsValuesList200Success

Even if a response returns a successful response code it is possible that the result is incomplete due to an internal error.

In this case an 'error' property with information about the problem is added. The caller may decide to work with the incomplete result or do a retry of the operation.|

Throws

Error TypeError Message
AppSettingsErrorEnvelopeErrorFailed. The input is invalid. | Failed. The specified schema is not found.
Code example
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";

const data =
  await appSettingsObjectsClient.getEffectiveAppSettingsValues();

postAppSettingsObject

⚠️ Deprecated

appSettingsObjectsClient.postAppSettingsObject(config): Promise<void | AppSettingsObjectResponse>

Creates a new settings object

Required scope: app-settings:objects:write Required permission: app-settings:objects:write

Creates a new settings object.

Parameters

NameTypeDescription
config.body*requiredAppSettingsObjectCreate
config.validateOnlybooleanIf true, the request runs only validation of the submitted settings objects, without saving them.

Default: false

Returns

Return typeStatus codeDescription
void200Success. No validation errors.
AppSettingsObjectResponse201Created

Throws

Error TypeError Message
AppSettingsErrorEnvelopeErrorFailed. The input is invalid. | Failed. Forbidden. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource.
Code example
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";

const data =
  await appSettingsObjectsClient.postAppSettingsObject({
    body: { schemaId: "jira-connection", value: {} },
  });

putAppSettingsObjectByObjectId

⚠️ Deprecated

appSettingsObjectsClient.putAppSettingsObjectByObjectId(config): Promise<void>

Updates an existing settings object

Required scope: app-settings:objects:write Required permission: app-settings:objects:write

Updates an existing settings object with new values. To update a property of the secret type you need to pass the new value unmasked. To keep the current value, send the current masked secret. You can obtain it via GET an object endpoint.

Some schemas don't allow passing of the masked secret. In that case you need to send the unmasked secret with every update of the object.

Parameters

NameTypeDescription
config.body*requiredAppSettingsObjectUpdate
config.objectId*requiredstringThe ID of the required settings object.
config.optimisticLockingVersion*requiredstring

The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.

It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.

Returns

Return typeStatus codeDescription
void200Success

Throws

Error TypeError Message
AppSettingsErrorEnvelopeErrorFailed. The input is invalid. | Failed. Forbidden. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource.
Code example
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";

const data =
  await appSettingsObjectsClient.putAppSettingsObjectByObjectId(
    {
      objectId: "...",
      optimisticLockingVersion: "...",
      body: { value: {} },
    },
  );

resolveEffectivePermissions

⚠️ Deprecated

appSettingsObjectsClient.resolveEffectivePermissions(config): Promise<EffectivePermissions>

Get the effective settings permissions of the calling user in the environment

Required scope: app-settings:objects:read or app-settings:objects:write Required permission: app-settings:objects:read or app-settings:objects:write

Parameters

NameType
config.body*requiredResolutionRequest

Throws

Error TypeError Message
AppSettingsErrorEnvelopeErrorFailed. The input is invalid. | Failed. Forbidden. No access to any schema. | Failed.
Code example
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";

const data =
  await appSettingsObjectsClient.resolveEffectivePermissions(
    {
      body: {
        permissions: [
          {
            permission: "app-settings:objects:read",
            context: { schemaId: "..." },
          },
        ],
      },
    },
  );

Types

AppSettingsError

NameTypeDescription
codenumberThe HTTP status code
detailsAppSettingsErrorDetailsThe error details
message*requiredstringThe error message

AppSettingsErrorDetails

The error details

NameTypeDescription
constraintViolationsArray<ConstraintViolation>A list of constraint violations
missingScopesArray<string>In case of a 403 - Forbidden response, a list of missing scopes necessary to successfully execute the request

AppSettingsErrorEnvelope

NameType
error*requiredAppSettingsError

AppSettingsErrorIncomplete

Error object for an incomplete response

NameTypeDescription
codenumberThe HTTP status code
detailsAppSettingsErrorDetailsThe error details
message*requiredstringThe error message

AppSettingsModificationInfo

Modification information about the app setting.

NameTypeDescription
createdBystringThe unique identifier of the user who created the app setting.

Example: fab17b7a-2eb2-4c95-b818-743d94be2c30
createdTimeDateTimestamp when the app settings was created in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
lastModifiedBystringThe unique identifier of the user who performed the most recent modification.

Example: fab17b7a-2eb2-4c95-b818-743d94be2c30
lastModifiedTimeDateTimestamp when the app setting was last modified in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

AppSettingsObject

A settings object.

NameTypeDescription
modificationInfoAppSettingsModificationInfoModification information about the app setting.
objectId*requiredstringThe ID of the settings object.

Example: Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=
resourceContextResourceContextThe resource context, which contains additional permission information about the object.
schemaIdstringThe schema on which the object is based.

Example: jira-connection
schemaVersionstringThe version of the schema on which the object is based.

Example: 1.0.0
searchSummarystringA searchable summary string of the setting value. Plain text without Markdown.
summarystringA short summary of settings. This can contain Markdown and will be escaped accordingly.
valueAppSettingsValue

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

version*requiredstring

The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.

It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.



Example: Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=

AppSettingsObjectCreate

Configuration of a new settings object.

NameTypeDescription
insertAfterstring

The position of the new object. The new object will be added after the specified one.

If null, the new object will be placed in the last position.

If set to empty string, the new object will be placed in the first position.

Only applicable for objects based on schemas with ordered objects (schema's ordered parameter is set to true).



Example: Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=
schemaId*requiredstringThe schema on which the object is based.

Example: jira-connection
value*requiredAppSettingsValue

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

AppSettingsObjectResponse

The response to a creation request.

NameTypeDescription
objectId*requiredstringThe ID of the created settings object.

Example: Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=
version*requiredstring

The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users.

It is generated upon retrieval (GET requests). If set on update (PUT request) or deletion, the update/deletion will be allowed only if there wasn't any change between the retrieval and the update.



Example: Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=

AppSettingsObjectUpdate

An update of a settings object.

NameTypeDescription
insertAfterstring

The position of the updated object. The new object will be moved behind the specified one.

insertAfter and insertBefore are evaluated together and only one of both can be set.

If null and insertBefore 'null', the existing object keeps the current position.

If set to empty string, the updated object will be placed in the first position.

Only applicable for objects based on schemas with ordered objects (schema's ordered parameter is set to true).



Example: Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=
insertBeforestring

The position of the updated object. The new object will be moved in front of the specified one.

insertAfter and insertBefore are evaluated together and only one of both can be set.

If null and insertAfter 'null', the existing object keeps the current position.

If set to empty string, the updated object will be placed in the last position.

Only applicable for objects based on schemas with ordered objects (schema's ordered parameter is set to true).



Example: Y2ktaGdyb3VwLTEyMythZjhjOThlOS0wN2I0LTMyMGEtOTQzNi02NTEyMmVlNWY4NGQ=
value*requiredAppSettingsValue

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

AppSettingsObjectsList

A list of settings objects.

NameTypeDescription
errorAppSettingsErrorIncompleteError object for an incomplete response
items*requiredArray<AppSettingsObject>A list of settings objects.
nextPageKeystring

The cursor for the next page of results. Has the value of null on the last page.

Use it in the nextPageKey query parameter to obtain subsequent pages of the result.



Example: AQAAABQBAAAABQ==
pageSize*requirednumberThe number of entries per page.
totalCount*requirednumberThe total number of entries in the result.

ConstraintViolation

A list of constraint violations

NameType
locationstring
messagestring
parameterLocation"HEADER" | "PATH" | "PAYLOAD_BODY" | "QUERY"
pathstring

EffectiveAppSettingsValue

An effective settings value.

NameTypeDescription
modificationInfoAppSettingsModificationInfoModification information about the app setting.
schemaIdstringThe schema on which the object is based.

Example: jira-connection
schemaVersionstringThe version of the schema on which the object is based.

Example: 1.0.0
searchSummarystringA searchable summary string of the setting value. Plain text without Markdown.
summarystringA short summary of settings. This can contain Markdown and will be escaped accordingly.
valueAppSettingsValue

The value of the setting.

It defines the actual values of settings' parameters.

The actual content depends on the object's schema.

EffectiveAppSettingsValuesList

A list of effective settings values.

NameTypeDescription
errorAppSettingsErrorIncompleteError object for an incomplete response
items*requiredArray<EffectiveAppSettingsValue>A list of effective settings values.
nextPageKeystring

The cursor for the next page of results. Has the value of null on the last page.

Use it in the nextPageKey query parameter to obtain subsequent pages of the result.



Example: AQAAABQBAAAABQ==
pageSize*requirednumberThe number of entries per page.
totalCount*requirednumberThe total number of entries in the result.

EffectivePermission

NameType
contextPermissionContext
granted*required"true" | "false" | "condition"
permission*requiredstring

EffectivePermissions

type: Array<EffectivePermission>

Modifications

The additional modification details for this settings object.

NameTypeDescription
firstbooleanIf non-moveable settings object is in the first group of non-moveable settings, or in the last (start or end of list).
modifiablePaths*requiredArray<string>Property paths which are modifiable, regardless if the write operation is allowed.
movablebooleanIf settings object can be moved/reordered. Only applicable for ordered list schema.
nonModifiablePaths*requiredArray<string>Property paths which are not modifiable, even if the write operation is allowed.

PermissionContext

NameType
schemaId*requiredstring

ResolutionRequest

NameType
permissions*requiredArray<SinglePermissionRequest>

ResourceContext

The resource context, which contains additional permission information about the object.

NameTypeDescription
modifications*requiredModificationsThe additional modification details for this settings object.
operations*requiredArray<"read" | "write" | "delete">The allowed operations on this settings object.

SinglePermissionRequest

optional generic set of context data

NameType
contextPermissionContext
permission*required"app-settings:objects:read" | "app-settings:objects:write"

Enums

ConstraintViolationParameterLocation

⚠️ Deprecated Use literal values.

Enum keys

Header | Path | PayloadBody | Query

EffectivePermissionGranted

⚠️ Deprecated Use literal values.

Enum keys

Condition | False | True

ResourceContextOperationsItem

⚠️ Deprecated Use literal values.

Enum keys

Delete | Read | Write

SinglePermissionRequestPermission

⚠️ Deprecated Use literal values.

Enum keys

AppSettingsObjectsRead | AppSettingsObjectsWrite

版本与发布记录

@dynatrace-sdk/client-app-settings 共发布 16 个版本,首次发布于 2024/02/28;过去 12 个月发布了 1 个版本。

版本发布日期距今
1.10.0latest2026/11/0310 天前
1.9.82025/09/221.1 年前
1.9.72025/07/151.3 年前
1.9.62025/07/011.4 年前
1.9.52025/06/171.4 年前
1.9.42025/02/121.7 年前

关于 @dynatrace-sdk/client-app-settings 的常见问题

@dynatrace-sdk/client-app-settings 是什么?

Retrieve, update and manage app settings.

如何安装 @dynatrace-sdk/client-app-settings?

在项目目录运行 npm install @dynatrace-sdk/client-app-settings,或使用 pnpm add / yarn add / bun add。

@dynatrace-sdk/client-app-settings 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@dynatrace-sdk/client-app-settings 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@dynatrace-sdk/client-app-settings 可以商用吗?

@dynatrace-sdk/client-app-settings 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@dynatrace-sdk/client-app-settings 的下载量有多少?

根据 npm 官方下载统计,@dynatrace-sdk/client-app-settings 在 2026/10/13 – 2026/11/11 这 30 天内被下载 14,412 次,日均约 480 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dynatrace-sdk/client-app-settings 还在维护吗?

最新版本 1.10.0 发布于 2026/11/03(10 天前);至今共发布 16 个版本,其中过去 12 个月发布了 1 个;首次发布于 2024/02/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。