Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@dynatrace-sdk/client-app-settings
Advanced tools
Retrieve, update and manage app settings.
npm install @dynatrace-sdk/client-app-settings
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Full API reference for the latest version of the SDK is also available at the Dynatrace Developer.
import { appSettingsObjectsClient } from '@dynatrace-sdk/client-app-settings';
Deletes the specified settings object
Required scope: app-settings:objects:write Required permission: app-settings:objects:write
Name | Type | Description |
---|---|---|
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 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. |
Return type | Status code | Description |
---|---|---|
void | 204 | Success. Response doesn't have a body. |
Error Type | Error Message |
---|---|
AppSettingsErrorEnvelopeError | Failed. The input is invalid. | Failed. Forbidden. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource. |
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.deleteAppSettingsObjectByObjectId(
{ objectId: "...", optimisticLockingVersion: "..." },
);
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.
Name | Type | Description |
---|---|---|
config.objectId*required | string | The ID of the required settings object. |
Return type | Status code | Description |
---|---|---|
AppSettingsObject | 200 | Success |
Error Type | Error Message |
---|---|
AppSettingsErrorEnvelopeError | Failed. The input is invalid. | Failed. Forbidden. | No object available for the given objectId |
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.getAppSettingsObjectByObjectId(
{ objectId: "..." },
);
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.
Name | Type | Description |
---|---|---|
config.addFields | string | 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. |
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 500. If not set, 100 is used. |
config.schemaIds | string | A list of comma-separated schema IDs to which the requested objects belong. To load the first page, when the nextPageKey is not set, this parameter is required. |
Return type | Status code | Description |
---|---|---|
AppSettingsObjectsList | 200 | Success. 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.|
Error Type | Error Message |
---|---|
AppSettingsErrorEnvelopeError | Failed. The input is invalid. | Failed. Forbidden. | Failed. The specified schema was not found. |
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.getAppSettingsObjects();
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.
Name | Type | Description |
---|---|---|
config.addFields | string | 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. |
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 500. If not set, 100 is used. |
config.schemaIds | string | A list of comma-separated schema IDs to which the requested objects belong. Only considered on load of the first page, when the nextPageKey is not set. |
Return type | Status code | Description |
---|---|---|
EffectiveAppSettingsValuesList | 200 | Success |
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.|
Error Type | Error Message |
---|---|
AppSettingsErrorEnvelopeError | Failed. The input is invalid. | Failed. The specified schema is not found. |
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.getEffectiveAppSettingsValues();
Creates a new settings object
Required scope: app-settings:objects:write Required permission: app-settings:objects:write
Creates a new settings object.
Name | Type | Description |
---|---|---|
config.body*required | AppSettingsObjectCreate | |
config.validateOnly | boolean | If true , the request runs only validation of the submitted settings objects, without saving them. |
Return type | Status code | Description |
---|---|---|
void | 200 | Success. No validation errors. |
AppSettingsObjectResponse | 201 | Created |
Error Type | Error Message |
---|---|
AppSettingsErrorEnvelopeError | Failed. The input is invalid. | Failed. Forbidden. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource. |
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.postAppSettingsObject({
body: { schemaId: "jira-connection", value: {} },
});
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.
Name | Type | Description |
---|---|---|
config.body*required | AppSettingsObjectUpdate | |
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 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. |
Return type | Status code | Description |
---|---|---|
void | 200 | Success |
Error Type | Error Message |
---|---|
AppSettingsErrorEnvelopeError | Failed. The input is invalid. | Failed. Forbidden. | Failed. The requested resource doesn't exist. | Failed. Conflicting resource. |
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.putAppSettingsObjectByObjectId(
{
objectId: "...",
optimisticLockingVersion: "...",
body: { value: {} },
},
);
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
Name | Type |
---|---|
config.body*required | ResolutionRequest |
Error Type | Error Message |
---|---|
AppSettingsErrorEnvelopeError | Failed. The input is invalid. | Failed. Forbidden. No access to any schema. | Failed. |
import { appSettingsObjectsClient } from "@dynatrace-sdk/client-app-settings";
const data =
await appSettingsObjectsClient.resolveEffectivePermissions(
{
body: {
permissions: [
{
permission:
SinglePermissionRequestPermission.AppSettingsObjectsRead,
context: { schemaId: "..." },
},
],
},
},
);
Name | Type | Description |
---|---|---|
code | number | The HTTP status code |
details | AppSettingsErrorDetails | The error details |
message*required | string | The error message |
The error details
Name | Type | Description |
---|---|---|
constraintViolations | Array<ConstraintViolation> | A list of constraint violations |
missingScopes | Array<string> | In case of a 403 - Forbidden response, a list of missing scopes necessary to successfully execute the request |
Name | Type |
---|---|
error*required | AppSettingsError |
Error object for an incomplete response
Name | Type | Description |
---|---|---|
code | number | The HTTP status code |
details | AppSettingsErrorDetails | The error details |
message*required | string | The error message |
Modification information about the app setting.
Name | Type | Description |
---|---|---|
createdBy | string | The unique identifier of the user who created the app setting. |
createdTime | Date | Timestamp when the app settings was created in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
lastModifiedBy | string | The unique identifier of the user who performed the most recent modification. |
lastModifiedTime | Date | Timestamp when the app setting was last modified in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z') |
A settings object.
Name | Type | Description |
---|---|---|
modificationInfo | AppSettingsModificationInfo | Modification information about the app setting. |
objectId*required | string | The ID of the settings object. |
resourceContext | ResourceContext | The resource context, which contains additional permission information about the object. |
schemaId | string | The schema on which the object is based. |
schemaVersion | string | The version of the schema on which the object is based. |
searchSummary | string | A searchable summary string of the setting value. Plain text without Markdown. |
summary | string | A short summary of settings. This can contain Markdown and will be escaped accordingly. |
value | AppSettingsValue | The value of the setting. It defines the actual values of settings' parameters. The actual content depends on the object's schema. |
version*required | string | 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. |
Configuration of a new settings object.
Name | Type | Description |
---|---|---|
insertAfter | string | The position of the new object. The new object will be added after the specified one. If 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 |
schemaId*required | string | The schema on which the object is based. |
value*required | AppSettingsValue | The value of the setting. It defines the actual values of settings' parameters. The actual content depends on the object's schema. |
The response to a creation request.
Name | Type | Description |
---|---|---|
objectId*required | string | The ID of the created settings object. |
version*required | string | 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. |
An update of a settings object.
Name | Type | Description |
---|---|---|
insertAfter | string | 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 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 |
insertBefore | string | 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 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 |
value*required | AppSettingsValue | The value of the setting. It defines the actual values of settings' parameters. The actual content depends on the object's schema. |
A list of settings objects.
Name | Type | Description |
---|---|---|
error | AppSettingsErrorIncomplete | Error object for an incomplete response |
items*required | Array<AppSettingsObject> | A list of settings objects. |
nextPageKey | string | The cursor for the next page of results. Has the value of Use it in the nextPageKey query parameter to obtain subsequent pages of the result. |
pageSize*required | number | The number of entries per page. |
totalCount*required | number | The total number of entries in the result. |
A list of constraint violations
Name | Type |
---|---|
location | string |
message | string |
parameterLocation | "HEADER" | "PATH" | "PAYLOAD_BODY" | "QUERY" |
path | string |
An effective settings value.
Name | Type | Description |
---|---|---|
modificationInfo | AppSettingsModificationInfo | Modification information about the app setting. |
schemaId | string | The schema on which the object is based. |
schemaVersion | string | The version of the schema on which the object is based. |
searchSummary | string | A searchable summary string of the setting value. Plain text without Markdown. |
summary | string | A short summary of settings. This can contain Markdown and will be escaped accordingly. |
value | AppSettingsValue | The value of the setting. It defines the actual values of settings' parameters. The actual content depends on the object's schema. |
A list of effective settings values.
Name | Type | Description |
---|---|---|
error | AppSettingsErrorIncomplete | Error object for an incomplete response |
items*required | Array<EffectiveAppSettingsValue> | A list of effective settings values. |
nextPageKey | string | The cursor for the next page of results. Has the value of Use it in the nextPageKey query parameter to obtain subsequent pages of the result. |
pageSize*required | number | The number of entries per page. |
totalCount*required | number | The total number of entries in the result. |
Name | Type |
---|---|
context | PermissionContext |
granted*required | "true" | "false" | "condition" |
permission*required | string |
type: Array<EffectivePermission>
The additional modification details for this settings object.
Name | Type | Description |
---|---|---|
first | boolean | If non-moveable settings object is in the first group of non-moveable settings, or in the last (start or end of list). |
modifiablePaths*required | Array<string> | Property paths which are modifiable, regardless if the write operation is allowed. |
movable | boolean | If settings object can be moved/reordered. Only applicable for ordered list schema. |
nonModifiablePaths*required | Array<string> | Property paths which are not modifiable, even if the write operation is allowed. |
Name | Type |
---|---|
schemaId*required | string |
Name | Type |
---|---|
permissions*required | Array<SinglePermissionRequest> |
The resource context, which contains additional permission information about the object.
Name | Type | Description |
---|---|---|
modifications*required | Modifications | The additional modification details for this settings object. |
operations*required | Array<"read" | "write" | "delete"> | The allowed operations on this settings object. |
optional generic set of context data
Name | Type |
---|---|
context | PermissionContext |
permission*required | "app-settings:objects:read" | "app-settings:objects:write" |
Header
| Path
| PayloadBody
| Query
Condition
| False
| True
Delete
| Read
| Write
AppSettingsObjectsRead
| AppSettingsObjectsWrite
FAQs
Retrieve, update and manage app settings.
The npm package @dynatrace-sdk/client-app-settings receives a total of 102 weekly downloads. As such, @dynatrace-sdk/client-app-settings popularity was classified as not popular.
We found that @dynatrace-sdk/client-app-settings demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.