@dynatrace-sdk/client-settings
v1.0.0
Published
[](https://www.npmjs.com/package/@dynatrace-sdk/client-settings/v/1.0.0) [](https://opensource.org/licenses/Apache-2.0)
Keywords
Readme
@dynatrace-sdk/client-settings
Overview
Manage Dynatrace settings through a schema-driven API for storing, querying, and maintaining configuration objects.
Managing settings objects
Create, retrieve, update, delete, reorder, and inspect settings objects. These endpoints also help you resolve effective settings values so you can understand how configuration is applied.
Managing access and ownership
Query and update permissions for settings objects, grant or revoke access for specific users and groups, and change ownership when needed. These endpoints support the security and governance workflows around shared configuration.
Reviewing change history
Retrieve revision history for settings objects to inspect how configuration changed over time. This helps with auditing, troubleshooting, and understanding previous updates.
Working with schemas
Discover and retrieve schema definitions that describe available settings types and their structure. These endpoints help clients understand which properties are supported and how settings objects must be shaped.
Supporting interactive editing
Use helper endpoints for validation, default generation, and value summaries during schema-based editing workflows. These operations are intended to support guided and interactive settings editors.
Installation
npm install @dynatrace-sdk/client-settingsGetting help
- Visit SDK for Typescript guide in the Dynatrace Developer
- Ask a question in the Dynatrace Community
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.
settingsHistoryClient
import { settingsHistoryClient } from '@dynatrace-sdk/client-settings';listSettingsHistory
Gets the history of settings objects
Required scope: settings:objects:read
Returns revision history for settings objects, based on audit logs read from Grail with event.provider == 'SETTINGS' filter as described here.
You can use query parameters to sort, filter and paginate the results. If filter isn't provided, the API returns revisions from the last 2 weeks.
Parameters
| Name | Type | Description | | --- | --- | --- | |config.addFields|string|A list of fields to be included in the response. The provided set of fields extends the default set. Specify the required top-level fields, separated by commas (for example, revision,modificationInfo). Supported fields: revision, jsonPatch, jsonBefore, jsonAfter, objectId, type, schemaVersion, modificationInfo, schemaId, schemaDisplayName, summary, appId, source, ownerBefore, ownerAfter. Default fields: revision, modificationInfo. | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.filter|string|The filter parameter, as explained here. Nesting and unary operators aren't supported. Filtering is supported on the following fields: revision objectId schemaVersion modificationInfo.lastModifiedTime modificationInfo.lastModifiedBy If this parameter is omitted only revisions of the last 2 weeks are returned. If modificationInfo.lastModifiedTime doesn't specify a full range, it will be completed with current time minus 1 year for the missing lower bound or the current time for the upper bound. When the admin-access is set to false, this parameter is required for schemas with enabled owner based access control and must contain objectId field with operator ==. | |config.pageKey|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 page-key query parameter. When the page-key is set to obtain subsequent pages, you must omit all other query parameters. | |config.pageSize|number|The amount of settings objects in a single response payload. The maximal allowed page size is 5000. If not set, 100 is used. | |config.schemaIds|string|Schema IDs to which the requested revisions belong as a comma-separated list. To load the first page, when the page-key isn't set, this parameter is required. | |config.scope|string|Scope to which the requested revisions belong. To load the first page, when the page-key isn't set, this parameter is required. | |config.sort|string|The sort parameter, as explained here Sorting is supported on the following fields: modificationInfo.lastModifiedTime |
Returns
| Return type | Status code | Description | |---|---|---| |RevisionDiffPage|200|Success.|
Throws
| Error Type | Error Message | |---|---| |NotFoundSchema|Failed. The specified schema wasn't found.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsHistoryClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsHistoryClient.listSettingsHistory();settingsInteractiveEditingSupportClient
import { settingsInteractiveEditingSupportClient } from '@dynatrace-sdk/client-settings';generateSchemaDefaultValue
Required scope: settings:schemas:read
Gets the default value of a settings schema.
Parameters
| Name | Type | Description | | --- | --- | --- | |config.schemaId*required|string|The ID of the requested schema. | |config.schemaVersion|string|The requested version of the schema. If not set, the most recent version is assumed. | |config.scope|string|The ID of the scope. |
Returns
| Return type | Status code | Description | |---|---|---| |SettingsDefaultObject|200|Success.|
Throws
| Error Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |Forbidden|Failed. Forbidden.| |NotFoundSchemaIdVersion|No schema could be found for the given schema-id and schema-version.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsInteractiveEditingSupportClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsInteractiveEditingSupportClient.generateSchemaDefaultValue(
{ schemaId: "..." },
);summarizeSettingsValue
Generate a summary for a specific settings value
Required scope: settings:schemas:read
Parameters
| Name | Type | Description | | --- | --- | --- | |config.body*required|SettingsObjectSummarize| | |config.schemaId*required|string|The ID of the required schema. |
Returns
| Return type | Status code | Description | |---|---|---| |SettingsObjectSummary|200|Success.|
Throws
| Error Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |Forbidden|Failed. Forbidden.| |NotFoundMultiObjectSchema|No multi-object schema could be found for the given schemaId and schemaVersion.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsInteractiveEditingSupportClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsInteractiveEditingSupportClient.summarizeSettingsValue(
{ schemaId: "...", body: { value: {} } },
);validateSettingsContainer
Validates the given settings container.
Required scope: settings:schemas:read
Validates the given settings container.
Parameters
| Name | Type | Description | | --- | --- | --- | |config.body*required|CustomContainerValidationRequest| | |config.schemaId*required|string|The ID of the schema. | |config.schemaVersion|string|Version of the schema. | |config.scope|string|The ID of the scope. | |config.validatorId*required|string|The identifier of the validator. |
Returns
| Return type | Status code | Description | |---|---|---| |ValidationResponse|200|Validated. Details in the response body.|
Throws
| Error Type | Error Message | |---|---| |NotFoundValidator|Failed. Validator with the given identifier not found.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsInteractiveEditingSupportClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsInteractiveEditingSupportClient.validateSettingsContainer(
{
schemaId: "...",
validatorId: "...",
body: { value: {} },
},
);validateSettingsProperty
Validates the given settings property.
Required scope: settings:schemas:read
Validates the given settings property value with the given custom validator.
Parameters
| Name | Type | Description | | --- | --- | --- | |config.body*required|CustomPropertyValidationRequest| | |config.schemaId*required|string|The ID of the schema. | |config.schemaVersion|string|Version of the schema. | |config.scope|string|The ID of the scope. | |config.validatorId*required|string|The identifier of the validator. |
Returns
| Return type | Status code | Description | |---|---|---| |ValidationResponse|200|Validated. Details in the response body.|
Throws
| Error Type | Error Message | |---|---| |NotFoundValidator|Failed. Validator with the given identifier not found.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsInteractiveEditingSupportClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsInteractiveEditingSupportClient.validateSettingsProperty(
{ schemaId: "...", validatorId: "...", body: {} },
);settingsObjectsClient
import { settingsObjectsClient } from '@dynatrace-sdk/client-settings';deleteSettingsObject
Deletes the specified settings object
Required scope: settings:objects:write
Parameters
| Name | Type | Description | | --- | --- | --- | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.objectId*required|string|The ID of the required settings object | |config.optimisticLockingVersion*required|string|The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users. It's 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. | |config.validateOnly|boolean|If true, the request runs only validation for the deletion of the settings object, without actually deleting it. |
Returns
| Return type | Status code | Description | |---|---|---| |void|204|Success. Response doesn't have a body.|
Throws
| Error Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |Forbidden|Failed. Forbidden.| |NotFoundResource|Failed. The requested resource doesn't exist.| |ConflictingResource|Failed. Conflicting resource.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsObjectsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsObjectsClient.deleteSettingsObject({
objectId: "...",
optimisticLockingVersion: "...",
});getSettingsObject
Gets the specified settings object
Required scope: 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
| Name | Type | Description | | --- | --- | --- | |config.addFields|string|A list of fields to be included in 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, scope, schemaId, schemaVersion, modificationInfo, resourceContext, value, owner, externalId. Default fields: objectId, version, scope, schemaId, schemaVersion, value, externalId. | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |SettingsObject|200|Success.|
Throws
| Error Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |Forbidden|Failed. Forbidden.| |NotFoundObject|No object available for the given objectId.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsObjectsClient } from "@dynatrace-sdk/client-settings";
const data = await settingsObjectsClient.getSettingsObject({
objectId: "...",
});listEffectiveSettingsValues
Lists effective settings values
Required scope: settings:objects:read
Lists effective settings values for selected schema. If no object is persisted for a schema with "multiObject": false, the default value as defined in the schema will be returned.
Parameters
| Name | Type | Description | | --- | --- | --- | |config.addFields|string|A list of fields to be included in the response. The provided set of fields extends the default set. Specify the required top-level fields, separated by commas (for example, summary,origin). Supported fields: summary, searchSummary, schemaId, schemaVersion, origin, modificationInfo, value, classicOrigin. Default fields: value. | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.optimisticLockingVersion|string|The version of the objects list for optimistic locking. You can use it to detect simultaneous modifications by different users. It's generated upon retrieval of the list of objects (GET requests). " If specified and modifications were made between retrieval and the request, the request will fail. | |config.pageKey|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 page-key query parameter. When the page-key is set to obtain subsequent pages, you must omit all other query parameters except the optimistic-locking-version parameter. | |config.pageSize|number|The amount of settings objects in a single response payload. The maximal allowed page size is 500. If not set, the response won't be paged. | |config.schemaId|string|Schema ID to which the requested objects belong. Only considered on load of the first page, when the page-key isn't set. | |config.scope|string|Scope to which the requested objects belong. Only considered on load of the first page, when the page-key isn't set. |
Returns
| Return type | Status code | Description | |---|---|---| |EffectiveSettingsValuesList|200|Success. Uses chunked encoding.
Even if a response returns a successful response code it's 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 Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |NotFoundSchemaIsNotFound|Failed. The specified schema isn't found.| |ListVersionMismatch|Paging data is outdated. The data has been modified since the initial request, query again from the first page to ensure a consistent result or rerun the same query without the optimistic locking version parameter to ignore.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsObjectsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsObjectsClient.listEffectiveSettingsValues();listSettingsObjects
Lists persisted settings objects
Required scope: settings:objects:read
Lists persisted settings objects for selected schemas.
If nothing is persisted or if all persisted settings objects aren't accessible due to missing permissions, no items will be returned.
To query the effective values (including schema defaults) see getEffectiveSettingsValues.
Parameters
| Name | Type | Description | | --- | --- | --- | |config.addFields|string|A list of fields to be included in 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, scope, schemaId, schemaVersion, modificationInfo, resourceContext, value, owner, externalId. Default fields: objectId, version. | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.filter|string|The filter parameter, as explained here. Filtering is supported on the following fields: modificationInfo.createdBy modificationInfo.createdTime modificationInfo.lastModifiedBy modificationInfo.lastModifiedTime value with properties and sub-properties separated by dot (for example, value.owningApp = 'Notebooks') externalId owner.type owner.id If this parameter is omitted, all settings objects will be returned. The maximum nesting depth (via parentheses) is 5. The maximum expression length is 1024 characters. Note that only fields included to the response via add-fields can be used for filtering. | |config.optimisticLockingVersion|string|The version of the objects list for optimistic locking. You can use it to detect simultaneous modifications by different users. It's generated upon retrieval of the list of objects (GET requests). " If specified and modifications were made between retrieval and the request, the request will fail. | |config.pageKey|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 page-key query parameter. When the page-key is set to obtain subsequent pages, you must omit all other query parameters except the optimistic-locking-version parameter. | |config.pageSize|number|The amount of settings objects in a single response payload. The maximal allowed page size is 500. If not set, the response won't be paged. | |config.schemaId|string|Schema ID to which the requested objects belong. To load the first page, when the page-key isn't set, this parameter is required. | |config.scope|string|Scope to which the requested objects belong. To load the first page, when the page-key isn't set, this parameter is required. | |config.sort|string|The sort parameter, as explained here. Sorting is supported on the following fields: modificationInfo.createdBy modificationInfo.createdTime modificationInfo.lastModifiedBy modificationInfo.lastModifiedTime value with properties and sub-properties separated by dot (for example, value.owningApp) Note that only fields included to the response via add-fields can be used for sorting. |
Returns
| Return type | Status code | Description | |---|---|---| |SettingsObjectsList|200|Success. Uses chunked encoding.
Even if a response returns a successful response code it's 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 Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |Forbidden|Failed. Forbidden.| |NotFoundSchema|Failed. The specified schema wasn't found.| |ListVersionMismatch|Paging data is outdated. The data has been modified since the initial request, query again from the first page to ensure a consistent result or rerun the same query without the optimistic locking version parameter to ignore.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsObjectsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsObjectsClient.listSettingsObjects();reorderSettingsObjects
Reorder multi-object settings objects
Required scope: settings:objects:write
Reorders settings objects for schemas defined as multi-object and ordered.
The new order is defined by the list of object IDs in the request body. If any objects change in the meantime, the reorder will be rejected to prevent overwriting concurrent changes, even if the changed objects aren't part of the defined reorder sections.
Parameters
| Name | Type | Description | | --- | --- | --- | |config.body*required|ReorderRequest| | |config.optimisticLockingVersion*required|string|The version of the objects for optimistic locking. You can use it to detect simultaneous modifications by different users. It's generated upon retrieval of the list of objects (GET requests). The reorder will be allowed only if there wasn't any change between the retrieval and the update. |
Returns
| Return type | Status code | Description | |---|---|---| |ReorderResponse|200|Success.|
Throws
| Error Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |Forbidden|Failed. Forbidden.| |NotFoundResource|Failed. The requested resource doesn't exist.| |ConflictingResource|Failed. Conflicting resource.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsObjectsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsObjectsClient.reorderSettingsObjects({
optimisticLockingVersion: "...",
body: {
schemaId: "builtin:schema",
scope: "environment",
sections: [
{
firstObjectId: "...",
lastObjectId: "...",
order: [{ objectId: "..." }],
},
],
},
});updateSettingsObject
Updates an existing settings object
Required scope: 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
| Name | Type | Description | | --- | --- | --- | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.body*required|SettingsObjectUpdate| | |config.objectId*required|string|The ID of the required settings object | |config.optimisticLockingVersion*required|string|The version of the object for optimistic locking. You can use it to detect simultaneous modifications by different users. It's 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. | |config.validateOnly|boolean|If true, the request runs only validation of the submitted settings object, without saving it. |
Returns
| Return type | Status code | Description | |---|---|---| |SettingsUpdateResponse|200|Success.| |void|204|Success. No validation errors.|
Throws
| Error Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |Forbidden|Failed. Forbidden.| |NotFoundResource|Failed. The requested resource doesn't exist.| |ConflictingResource|Failed. Conflicting resource.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsObjectsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsObjectsClient.updateSettingsObject({
objectId: "...",
optimisticLockingVersion: "...",
body: { value: {} },
});upsertSettingsObject
Creates a new settings object
Required scope: settings:objects:write
Parameters
| Name | Type | Description | | --- | --- | --- | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.body*required|SettingsObjectCreate| | |config.validateOnly|boolean|If true, the request runs only validation of the submitted settings objects, without saving them. |
Returns
| Return type | Status code | Description | |---|---|---| |SettingsObjectResponse|200|Existing object successfully updated.| |SettingsObjectResponse|201|Created.| |void|204|Success. No validation errors.|
Throws
| Error Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |Forbidden|Failed. Forbidden.| |NotFoundResource|Failed. The requested resource doesn't exist.| |ConflictingResource|Failed. Conflicting resource.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsObjectsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsObjectsClient.upsertSettingsObject({
body: {
schemaId: "jira-connection",
scope: "environment",
value: {},
},
});settingsPermissionsClient
import { settingsPermissionsClient } from '@dynatrace-sdk/client-settings';addSettingsObjectAccessorPermissions
Required scope: settings:objects:write
Add the permissions for a single accessor on this object, anyone with read/write permissions is allowed to add more permissions
Parameters
| Name | Type | Description | | --- | --- | --- | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.body*required|AccessorPermissions| | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |AccessorPermissions|201|Success.|
Throws
| Error Type | Error Message | |---|---| |BadRequestAccessorIdAlreadyExists|If accessor id already exists.| |NotFoundObject|No object available for the given objectId.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.addSettingsObjectAccessorPermissions(
{
objectId: "...",
body: { accessor: { type: "user" }, permissions: {} },
},
);deleteSettingsObjectAccessorPermissions
Required scope: settings:objects:write
Remove the permissions for an existing accessor on this object, anyone with read/write permissions is allowed to delete permissions
Parameters
| Name | Type | Description | | --- | --- | --- | |config.accessorId*required|string|The user uuid or group uuid of the accessor, depending on the type | |config.accessorType*required|"user" | "group"|The type of the accessor | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |void|204|Success.|
Throws
| Error Type | Error Message | |---|---| |NotFoundObjectOrNoPermissions|No object available for the given objectId or the accessor doesn't have any permissions on this object.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.deleteSettingsObjectAccessorPermissions(
{
objectId: "...",
accessorType: "user",
accessorId: "...",
},
);deleteSettingsObjectAllUsersPermissions
Required scope: settings:objects:write
Remove the permissions for an existing all-users accessor on this object, anyone with read/write permissions is allowed to delete permissions
Parameters
| Name | Type | Description | | --- | --- | --- | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |void|204|Success.|
Throws
| Error Type | Error Message | |---|---| |NotFoundObjectOrAllUsersNoPermissions|No object available for the given objectId or the all-users accessor doesn't have any permissions on this object.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.deleteSettingsObjectAllUsersPermissions(
{ objectId: "..." },
);getSettingsObjectAccessorPermissions
Required scope: settings:objects:read
Get current permissions of the accessor on this object
Parameters
| Name | Type | Description | | --- | --- | --- | |config.accessorId*required|string|The user uuid or group uuid of the accessor, depending on the type | |config.accessorType*required|"user" | "group"|The type of the accessor | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |AccessorPermissions|200|Success.|
Throws
| Error Type | Error Message | |---|---| |NotFoundObjectOrNoPermissions|No object available for the given objectId or the accessor doesn't have any permissions on this object.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.getSettingsObjectAccessorPermissions(
{
objectId: "...",
accessorType: "user",
accessorId: "...",
},
);getSettingsObjectAllUsersPermissions
Required scope: settings:objects:read
Get current permissions of the all-users accessor on this object
Parameters
| Name | Type | Description | | --- | --- | --- | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |AccessorPermissions|200|Success.|
Throws
| Error Type | Error Message | |---|---| |NotFoundObjectOrAllUsersNoPermissions|No object available for the given objectId or the all-users accessor doesn't have any permissions on this object.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.getSettingsObjectAllUsersPermissions(
{ objectId: "..." },
);getSettingsObjectPermissions
Required scope: settings:objects:read
Get current permissions on this object
Parameters
| Name | Type | Description | | --- | --- | --- | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |AccessorPermissionsList|200|Success.|
Throws
| Error Type | Error Message | |---|---| |NotFoundObject|No object available for the given objectId.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.getSettingsObjectPermissions(
{ objectId: "..." },
);resolveEffectivePermissions
Get the effective settings permissions of the calling user in the environment
Required scope: settings:schemas:read
Parameters
| Name | Type | | --- | --- | |config.body*required|ResolutionRequest|
Throws
| Error Type | Error Message | |---|---| |BadRequestInvalidInput|Failed. The input is invalid.| |ForbiddenNoSchemaAccess|Failed. Forbidden. No access to any schema.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.resolveEffectivePermissions(
{
body: {
permissions: [
{
permission: "settings:objects:read",
context: { schemaId: "...", scope: "..." },
},
],
},
},
);transferSettingsObjectOwnership
Required scope: settings:objects:write
Change owner of the object, only the owner or the main admin is allowed to transfer the ownership (IAM permission needed).
Parameters
| Name | Type | Description | | --- | --- | --- | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.body*required|TransferOwnershipRequest| | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |void|204|Success.|
Throws
| Error Type | Error Message | |---|---| |NotFoundObject|No object available for the given objectId.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.transferSettingsObjectOwnership(
{
objectId: "...",
body: { newOwner: { type: "user" } },
},
);updateSettingsObjectAccessorPermissions
Required scope: settings:objects:write
Update the permissions for an existing accessor on this object, anyone with read/write permissions is allowed to update permissions
Parameters
| Name | Type | Description | | --- | --- | --- | |config.accessorId*required|string|The user uuid or group uuid of the accessor, depending on the type | |config.accessorType*required|"user" | "group"|The type of the accessor | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.body*required|UpdatePermissionsRequest| | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |void|200|Success.|
Throws
| Error Type | Error Message | |---|---| |BadRequestPermissionListInvalid|If permission list is empty, contains unsupported entries or unsupported combinations of entries.| |NotFoundObjectOrNoPermissions|No object available for the given objectId or the accessor doesn't have any permissions on this object.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.updateSettingsObjectAccessorPermissions(
{
objectId: "...",
accessorType: "user",
accessorId: "...",
body: { permissions: {} },
},
);updateSettingsObjectAllUsersPermissions
Required scope: settings:objects:write
Update the permissions for an existing all-users accessor on this object, anyone with read/write permissions is allowed to update permissions
Parameters
| Name | Type | Description | | --- | --- | --- | |config.adminAccess|boolean|If set to true and user has settings:objects:admin permission, the endpoint will act as if the user is the owner of all objects | |config.body*required|UpdatePermissionsRequest| | |config.objectId*required|string|The ID of the required settings object |
Returns
| Return type | Status code | Description | |---|---|---| |void|200|Success.|
Throws
| Error Type | Error Message | |---|---| |BadRequestPermissionListInvalid|If permission list is empty, contains unsupported entries or unsupported combinations of entries.| |NotFoundObjectOrAllUsersNoPermissions|No object available for the given objectId or the all-users accessor doesn't have any permissions on this object.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsPermissionsClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsPermissionsClient.updateSettingsObjectAllUsersPermissions(
{ objectId: "...", body: { permissions: {} } },
);settingsSchemasClient
import { settingsSchemasClient } from '@dynatrace-sdk/client-settings';getSchemaDefinition
Gets parameters of the specified settings schema.
Required scope: settings:schemas:read
Gets parameters of the specified settings schema.
Parameters
| Name | Type | Description | | --- | --- | --- | |config.schemaId*required|string|The ID of the required schema. | |config.schemaVersion|string|The version of the required schema. If not set, the most recent version is returned. |
Returns
| Return type | Status code | Description | |---|---|---| |SettingsSchemaDefinition|200|Success.|
Throws
| Error Type | Error Message | |---|---| |NotFoundSchemaDoesNotExist|Failed. The specified schema doesn't exist.| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsSchemasClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsSchemasClient.getSchemaDefinition({
schemaId: "...",
});listSchemaDefinitions
Lists available settings schemas.
Required scope: settings:schemas:read
Lists available settings schemas.
Parameters
| Name | Type | Description | | --- | --- | --- | |config.addFields|string|A list of fields to be included in the response. The provided set of fields extends the default set. Specify the required top-level fields, separated by commas (for example, multiObject,ordered). Supported fields: schemaId, displayName, latestSchemaVersion, maturity, multiObject, ordered, ownerBasedAccessControl, schemaVersions. Default fields: schemaId, displayName, latestSchemaVersion. |
Returns
| Return type | Status code | Description | |---|---|---| |SchemaList|200|Success.|
Throws
| Error Type | Error Message | |---|---| |TooManyRequests|Failed. Too many requests.| |ServiceUnavailable|Failed. Service unavailable.| |GeneralError|Error.|
import { settingsSchemasClient } from "@dynatrace-sdk/client-settings";
const data =
await settingsSchemasClient.listSchemaDefinitions();Types
AccessorPermissions
| Name | Type | | --- | --- | |accessor*required|Identity| |permissions*required|PermissionsList|
AccessorPermissionsList
| Name | Type | | --- | --- | |accessors*required|Array<AccessorPermissions>|
BiComparableContainerConstraint
| Name | Type | Description | | --- | --- | --- | |customMessage|string|Message to be displayed if constraint is violated. | |properties*required|Array<string>|For type in [GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL] exactly two properties are required. | |type*required|"GREATER_THAN" | "GREATER_THAN_OR_EQUAL" | "LESS_THAN" | "LESS_THAN_OR_EQUAL"|Type also defines which properties are available. |
ByteSizeLimitConstraint
| Name | Type | Description | | --- | --- | --- | |byteLimit*required|number|For type = BYTE_SIZE_LIMIT | |customMessage|string|Message to be displayed if constraint is violated. | |type*required|"BYTE_SIZE_LIMIT"|Type also defines which properties are available. |
ComplexType
| Name | Type | Description | | --- | --- | --- | |constraints|Array<ContainerConstraint>|Container validation constraints the type values must fulfill to be persistable. | |description|string|Short description of what this type is used for. default: ""| |displayName|string|Defaults to id in the code-api. | |documentation|string|Additional information about the type, explanation of semantics of its values. | |properties*required|ComplexTypeProperties|Order is relevant for UI, not for serialization. | |searchPattern|string|If not specified the summaryPattern is used for search. | |summaryPattern|string|Defaults to empty string. Markdown symbols need to be escaped if they're to be displayed normally. default: ""| |type*required|"object"|Always has to be object for complex types. default: "object"| |version|string|Semantic version x.y.z, defaults to 0, has to be increased when properties are added/removed or structurally modified (type, nullable). default: "0"Pattern: ^\d+(\.\d+)*$| |versionInfo|string|Defaults to empty string. default: ""|
ComplexTypeProperties
Order is relevant for UI, not for serialization.
type: Record<string, Property>
ConstraintViolation
Contains information about a constraint violation caused by invalid input.
| Name | Type | Description | | --- | --- | --- | |message*required|string|The constraint violation description message | |path|string|The path of the parameter that caused the constraint violation |
CustomContainerValidationRequest
The request payload for a custom validation of a container.
| Name | Type | Description | | --- | --- | --- | |key|string|The key of the setting being validated. | |path|string|The path of the container being validated. | |value*required|CustomContainerValidationRequestValue|The container value. |
CustomDeletionValidatorReferenceConstraint
| Name | Type | Description | | --- | --- | --- | |customMessage|string|Message to be displayed if constraint is violated. | |customValidatorId*required|string|For type = CUSTOM_VALIDATOR_REF | |type|"CUSTOM_VALIDATOR_REF"|Type also defines which properties are available. |
CustomPropertyValidationRequest
The request payload for a custom validation of a single property value.
| Name | Type | Description | | --- | --- | --- | |arrayValue|Array<any>|The property value. | |booleanValue|null | boolean|The property value. | |floatValue|null | number|The property value. | |intValue|null | number|The property value. | |path|string|The path of the property being validated. | |stringValue|string|The property value. |
CustomSchemaValidatorReferenceConstraint
| Name | Type | Description | | --- | --- | --- | |customMessage|string|Message to be displayed if constraint is violated. | |customValidatorId*required|string|For type = CUSTOM_VALIDATOR_REF or MULTI_SCOPE_CUSTOM_VALIDATOR_REF. | |skipAsyncValidation|boolean|false - validate on every change in the UI, true - validate only on save default: false| |type*required|"CUSTOM_VALIDATOR_REF" | "MULTI_SCOPE_CUSTOM_VALIDATOR_REF"|Type also defines which properties are available. |
CustomValidatorReferenceConstraint
| Name | Type | Description | | --- | --- | --- | |customMessage|string|Message to be displayed if constraint is violated. | |customValidatorId*required|string|For type = CUSTOM_VALIDATOR_REF. | |skipAsyncValidation|boolean|false - validate on every change in the UI, true - validate only on save default: false| |timeout|number|For type = CUSTOM_VALIDATOR_REF. Default is 5 s. default: 5| |type*required|"CUSTOM_VALIDATOR_REF"|Typ
