
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@dynatrace-sdk/client-davis-analyzers
Advanced tools
This API allows you to interact with Davis® predictive and causal AI for customized AI/ML analysis.
Refer to the service documentation to get familiar with the key concepts.
npm install @dynatrace-sdk/client-davis-analyzers
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 { analyzersClient } from '@dynatrace-sdk/client-davis-analyzers';
Stop a started analyzer execution.
Required scope: davis:analyzers:execute
Use the request token that was returned when starting an analyzer execution to cancel it.
| Name | Type | Description |
|---|---|---|
| config.analyzerName*required | string | The name of the analyzer. |
| config.requestToken*required | string | The request token is returned when starting a long-running analyzer execution. It can be used to do follow-up operations like polling and cancelling. |
| Return type | Status code | Description |
|---|---|---|
| AnalyzerCancelResult | 200 | The current analyzer execution status and an optional partial result. |
| void | 202 | The cancel request was accepted and is being processed. |
| Error Type | Error Message |
|---|---|
| AnalyzerErrorEnvelopeError | Invalid or malformed request. | Insufficient permissions. | No analyzer available with the requested name. | The analyzer result with the request token has already been consumed or its time-to-live (TTL) has been reached. The result is not available anymore. | Client error. | Internal server error. |
import { analyzersClient } from "@dynatrace-sdk/client-davis-analyzers";
const data = await analyzersClient.cancelAnalyzerExecution({
analyzerName: "...",
requestToken: "RHluYXRyYWNlMjAyMw==",
});
Execute an analyzer with the given input.
Required scope: davis:analyzers:execute
The analyzer execution is started asynchronously. If the result is not available after the specified timeout, a request token is returned to poll for the result. Otherwise, the final result is directly available and no request token is returned.
Depending on the chosen analyzer and the analyzer input, additional scopes might be required, e.g.
storage:buckets:read and storage:metrics:read to enable the analyzer to read time series data from Grail™.
| Name | Type | Description |
|---|---|---|
| config.analyzerName*required | string | The name of the analyzer. |
| config.body*required | AnalyzerInput | |
| config.enablePreview | boolean | Indicates if analyzer results should preview already created outputs while the analyzer is still running. Set to false if only the final result is needed. |
| config.timeoutSeconds | number | The amount of seconds to wait for the response to be returned. The timeout controls how long the client is willing to wait, while the analyzer execution continues running until it has finished or is cancelled. |
| Return type | Status code | Description |
|---|---|---|
| AnalyzerExecuteResult | 200 | The final analyzer result and execution status. |
| AnalyzerExecuteResult | 202 | The current analyzer execution status and a request token and time-to-live (TTL) to continue polling the result with. |
| Error Type | Error Message |
|---|---|
| AnalyzerErrorEnvelopeError | Invalid or malformed request. | Insufficient permissions. | No analyzer available with the requested name. | Client error. | Internal server error. |
import { analyzersClient } from "@dynatrace-sdk/client-davis-analyzers";
const data = await analyzersClient.executeAnalyzer({
analyzerName: "...",
body: {
timeSeriesData: {
expression: "timeseries avg(dt.host.cpu.usage)",
},
forecastHorizon: 10,
},
});
Get the analyzer definition for an analyzer.
Required scope: davis:analyzers:read
All available meta-information for the analyzer is returned.
| Name | Type | Description |
|---|---|---|
| config.analyzerName*required | string | The name of the analyzer. |
| Return type | Status code | Description |
|---|---|---|
| AnalyzerDefinitionDetails | 200 | The definition of the requested analyzer. |
| Error Type | Error Message |
|---|---|
| AnalyzerErrorEnvelopeError | Invalid or malformed request. | Insufficient permissions. | No analyzer available with the requested name. | Client error. | Internal server error. |
import { analyzersClient } from "@dynatrace-sdk/client-davis-analyzers";
const data = await analyzersClient.getAnalyzer({
analyzerName: "...",
});
Get the documentation for an analyzer.
Required scope: davis:analyzers:read
A documentation may provide further information and context for a given analyzer. Not all analyzers provide documentation.
The documentation is returned as Markdown.
| Name | Type | Description |
|---|---|---|
| config.analyzerName*required | string | The name of the analyzer. |
| Return type | Status code | Description |
|---|---|---|
| void | 200 | The documentation of the requested analyzer. |
| Error Type | Error Message |
|---|---|
| AnalyzerErrorEnvelopeError | Invalid or malformed request. | Insufficient permissions. | No analyzer available with the requested name. | Client error. | Internal server error. |
import { analyzersClient } from "@dynatrace-sdk/client-davis-analyzers";
const data = await analyzersClient.getAnalyzerDocumentation(
{ analyzerName: "..." },
);
Get the JSON schema for an analyzer input.
Required scope: davis:analyzers:read
The JSON schema defines a standardized declaration of the input structure, providing well-defined input documentation that is both human- and machine-readable.
| Name | Type | Description |
|---|---|---|
| config.analyzerName*required | string | The name of the analyzer. |
| Return type | Status code | Description |
|---|---|---|
| void | 200 | The JSON input schema of the requested analyzer. |
| Error Type | Error Message |
|---|---|
| AnalyzerErrorEnvelopeError | Invalid or malformed request. | Insufficient permissions. | No analyzer available with the requested name. | Client error. | Internal server error. |
import { analyzersClient } from "@dynatrace-sdk/client-davis-analyzers";
const data = await analyzersClient.getJsonSchemaForInput({
analyzerName: "...",
});
Get the JSON schema for an analyzer result.
Required scope: davis:analyzers:read
The JSON schema defines a standardized declaration of the output structure, providing well-defined output documentation that is both human- and machine-readable.
| Name | Type | Description |
|---|---|---|
| config.analyzerName*required | string | The name of the analyzer. |
| Return type | Status code | Description |
|---|---|---|
| void | 200 | The JSON result schema of the requested analyzer. |
| Error Type | Error Message |
|---|---|
| AnalyzerErrorEnvelopeError | Invalid or malformed request. | Insufficient permissions. | No analyzer available with the requested name. | Client error. | Internal server error. |
import { analyzersClient } from "@dynatrace-sdk/client-davis-analyzers";
const data = await analyzersClient.getJsonSchemaForResult({
analyzerName: "...",
});
Poll for the result of a started analyzer execution.
Required scope: davis:analyzers:execute
Use the request token returned when starting an analyzer execution to poll for a result.
The executionStatus of the result indicates if the analyzer execution is already completed.
While the status is RUNNING, wait and poll for the result again in subsequent calls.
| Name | Type | Description |
|---|---|---|
| config.analyzerName*required | string | The name of the analyzer. |
| config.requestToken*required | string | The request token is returned when starting a long-running analyzer execution. It can be used to do follow-up operations like polling and cancelling. |
| config.timeoutSeconds | number | The amount of seconds to wait for the response to be returned. The timeout controls how long the client is willing to wait, while the analyzer execution continues running until it has finished or is cancelled. |
| Return type | Status code | Description |
|---|---|---|
| AnalyzerPollResult | 200 | The current analyzer execution status and an optional partial result. |
| Error Type | Error Message |
|---|---|
| AnalyzerErrorEnvelopeError | Invalid or malformed request. | Insufficient permissions. | No analyzer available with the requested name. | The analyzer result with the request token has already been consumed or its time-to-live (TTL) has been reached. The result is not available anymore. | Client error. | Internal server error. |
import { analyzersClient } from "@dynatrace-sdk/client-davis-analyzers";
const data = await analyzersClient.pollAnalyzerExecution({
analyzerName: "...",
requestToken: "RHluYXRyYWNlMjAyMw==",
});
Query all available analyzer definitions.
Required scope: davis:analyzers:read
The analyzer definition contains meta-information about an analyzer, including its input and output structure:
input definition specifies which fields the analyzer accepts, some of which may be required.output definition specifies how the returned analyzer result is structured.| Name | Type | Description |
|---|---|---|
| config.addFields | string | Specify which meta-information to fetch in addition to the default fields Valid values are:
Any other field will result in a HTTP 400 response. |
| config.filter | string | Use the When using the operators The following operators are supported:
Parenthesis and the The following fields are valid filtering parameters:
Any other field will result in a HTTP 400 response. |
| config.pageKey | string | The cursor for the page of results. Find it in the If the If not provided, the first page is always returned. |
| config.pageSize | number | The amount of returned analyzer definitions in a single response payload. By default, 50 is used. The maximum is 200. |
| Return type | Status code | Description |
|---|---|---|
| AnalyzerQueryResult | 200 | All available analyzer definitions. |
| Error Type | Error Message |
|---|---|
| AnalyzerErrorEnvelopeError | Insufficient permissions. | Client error. | Internal server error. |
import { analyzersClient } from "@dynatrace-sdk/client-davis-analyzers";
const data = await analyzersClient.queryAnalyzers();
Validate the provided input for an analyzer execution.
Required scope: davis:analyzers:execute
Provide the same input that is planned to be used for an analyzer execution to have it validated without executing the analyzer.
| Name | Type | Description |
|---|---|---|
| config.analyzerName*required | string | The name of the analyzer. |
| config.body*required | AnalyzerInput |
| Return type | Status code | Description |
|---|---|---|
| AnalyzerValidationResult | 200 | The validation result for the requested analyzer execution. |
| Error Type | Error Message |
|---|---|
| AnalyzerErrorEnvelopeError | No analyzer available with the requested name. | Insufficient permissions. | Not found | Client error. | Internal server error. |
import { analyzersClient } from "@dynatrace-sdk/client-davis-analyzers";
const data =
await analyzersClient.validateAnalyzerExecution({
analyzerName: "...",
body: {},
});
Result of cancelling the analyzer execution. Only returned if the result completes while cancelling.
| Name | Type | Description |
|---|---|---|
| requestToken | string | The request token is returned when starting a long-running analyzer execution. It can be used to do follow-up operations like polling and cancelling. |
| result*required | AnalyzerResult | |
| ttlInSeconds | number | Time-to-live until the result is not available anymore. |
The category of an analyzer used to logically group different analyzers.
| Name | Type |
|---|---|
| displayName*required | string |
The map of actual data matching the input and output definition of the analyzer.
type: Record<string, any>
The definition of the analyzer. It describes which input and output data the analyzer accepts and produces when being executed.
| Name | Type | Description |
|---|---|---|
| baseAnalyzer | string | The analyzer name that the current analyzer is based on. All input and output parameters are inherited. Additional parameters may be present in the current analyzer. |
| category | AnalyzerCategory | The category of an analyzer used to logically group different analyzers. |
| description | string | Detailed description of the analyzers' functionality. Get the documentation of the analyzer for more information. |
| displayName*required | string | |
| input | Array<ParameterDefinition> | |
| labels | Array<string> | A list of string-based labels to group and mark different analyzers. |
| name*required | string | The uniquely identifying name of the analyzer. |
| output | Array<ParameterDefinition> | |
| type | "IMPLEMENTED" | "INTERFACE" | The type of the analyzer.
|
The definition of the analyzer. It describes which input and output data the analyzer accepts and produces when being executed.
| Name | Type | Description |
|---|---|---|
| baseAnalyzer | string | The analyzer name that the current analyzer is based on. All input and output parameters are inherited. Additional parameters may be present in the current analyzer. |
| category | AnalyzerCategory | The category of an analyzer used to logically group different analyzers. |
| description | string | Detailed description of the analyzers' functionality. Get the documentation of the analyzer for more information. |
| displayName*required | string | |
| input | Array<ParameterDefinition> | |
| labels | Array<string> | A list of string-based labels to group and mark different analyzers. |
| name*required | string | The uniquely identifying name of the analyzer. |
| output | Array<ParameterDefinition> | |
| type | "IMPLEMENTED" | "INTERFACE" | The type of the analyzer.
|
A list of resolved dimensional data.
| Name | Type | Description |
|---|---|---|
| query*required | DimensionQuery | A query for dimensional data such as timeseries, entities, or logs. |
| type*required | "entityId" | "timeseriesArray" | The type of the dimensional query. |
| value*required | AnalyzerDimensionalDataValue | The resolved value of the dimensional query. |
The error that is returned for unsuccessful responses.
| Name | Type | Description |
|---|---|---|
| code*required | number | The HTTP status code of the error. |
| details | AnalyzerErrorDetails | |
| message*required | string |
| Name | Type |
|---|---|
| constraintViolations | Array<ConstraintViolation> |
| Name | Type | Description |
|---|---|---|
| error | AnalyzerError | The error that is returned for unsuccessful responses. |
Result of the analyzer execution.
| Name | Type | Description |
|---|---|---|
| requestToken | string | The request token is returned when starting a long-running analyzer execution. It can be used to do follow-up operations like polling and cancelling. |
| result*required | AnalyzerResult | |
| ttlInSeconds | number | Time-to-live until the result is not available anymore. |
| Name | Type | Description |
|---|---|---|
| level*required | "TRACING" | "INFO" | "WARNING" | "SEVERE" | Determines the severity of the log. |
| message*required | string | |
| path | string | A path pointing to the source of the error in the input. The format of the path follows the JSON path specification. |
Parameters that are present in all analyzer input parameter definitions.
| Name | Type | Description |
|---|---|---|
| logVerbosity | "TRACING" | "INFO" | "WARNING" | "SEVERE" | Determines the severity of the log. |
| resolveDimensionalQueryData | boolean | default: false |
| timeframe | Timeframe |
The input is specific to an analyzer. Get the definition of the analyzer to retrieve the required input structure.
| Name | Type | Description |
|---|---|---|
| generalParameters | AnalyzerGeneralParameters | Parameters that are present in all analyzer input parameter definitions. |
The output is specific to an analyzer. Get the definition of the analyzer to retrieve the required output structure.
| Name | Type | Description |
|---|---|---|
| system | AnalyzerOutputSystemParameters | Parameters that are present in all analyzer output parameter definitions. |
| Name | Type |
|---|---|
| level*required | "TRACING" | "INFO" | "WARNING" |
| message*required | string |
Parameters that are present in all analyzer output parameter definitions.
| Name | Type |
|---|---|
| logs | Array<AnalyzerOutputLog> |
Result of polling the analyzer execution.
| Name | Type | Description |
|---|---|---|
| requestToken | string | The request token is returned when starting a long-running analyzer execution. It can be used to do follow-up operations like polling and cancelling. |
| result*required | AnalyzerResult | |
| ttlInSeconds | number | Time-to-live until the result is not available anymore. |
The list of available analyzers.
| Name | Type | Description |
|---|---|---|
| analyzers*required | Array<AnalyzerDefinition> | |
| nextPageKey | string | The key that should be used to do follow-up requests, fetching the remaining analyzers. If the last page is reached or all analyzers are already listed, this field is omitted. |
| totalCount*required | number | The total amount of analyzers available opposed to the current page size. |
| Name | Type | Description |
|---|---|---|
| data | Array<AnalyzerDimensionalData> | |
| executionStatus*required | "RUNNING" | "ABORTED" | "COMPLETED" | |
| input*required | AnalyzerInput | The input is specific to an analyzer. Get the definition of the analyzer to retrieve the required input structure. |
| logs | Array<AnalyzerExecutionLog> | |
| output*required | Array<AnalyzerOutput> | |
| resultId*required | string | The uniquely identifying ID of the result. Used for logging. |
| resultStatus*required | "SUCCESSFUL" | "SUCCESSFUL_WITH_WARNINGS" | "FAILED" |
The result of the dry-execution of the analyzer.
| Name | Type | Description |
|---|---|---|
| details | AnalyzerErrorDetails | |
| valid*required | boolean | Whether the analyzer can be successfully executed with the given input data. |
A constraint violation indicating why an error has occurred.
| Name | Type | Description |
|---|---|---|
| level*required | "TRACING" | "INFO" | "WARNING" | "SEVERE" | Determines the severity of the log. |
| message*required | string | |
| path | string | A path pointing to the source of the error in the input. The format of the path follows the JSON path specification. |
An object that has a fixed set of possible values differentiated by the key property.
| Name | Type |
|---|---|
| description*required | string |
| displayName*required | string |
| key*required | string |
The definition for a single parameter, describing its name and other meta information.
| Name | Type | Description |
|---|---|---|
| advanced | boolean | If true, this parameter is considered to be for advanced usage. |
| array*required | boolean | Whether this parameter can have an array of values. Passing a single, non-array value is also allowed. |
| defaultValue | any | The default value used when the parameter is omitted. |
| description | string | |
| displayName*required | string | |
| enumerationValues | Array<EnumerationElement> | |
| extendedType | string | Provides extended type information for this parameter. This allows additional semantics that can be utilized by analyzer consumers. |
| fields | Array<ParameterDefinition> | Given the parameter is of type structure this property contains the sub-definition of the parameter. |
| maxSize | number | The maximum number of elements if the parameter is an array. |
| name*required | string | |
| optional*required | boolean | Whether this parameter can be omitted when executing the analyzer. |
| type*required | "string" | "number" | "boolean" | "timeseriesArray" | "analyzerStructure" | "dimensionQuery" | "enumeration" | "integer" | "timeframe" | "timeseriesQuery" | "timestamp" | The type of the parameter, indicating the format of the value to be provided. |
| valueConstraints | ParameterDefinitionValueConstraints | Defines value constraints for string or number parameters. Not applicable to other parameter types. |
| Name | Type | Description |
|---|---|---|
| endTime | string | Specify the end time in either absolute or relative format. For absolute format, use the ISO 8601 format (yyyy-MM-ddTHH:mm:ssZ). For relative format, use 'now' for the current time or apply an offset with the available units: 's' for seconds, 'm' for minutes, 'h' for hours, and 'd' for days. For example, use 'now-2h' or '-2h' for a relative offset of 2 hours. If not specified, defaults to now. |
| startTime*required | string | Specify the start time in either absolute or relative format. For absolute format, use the ISO 8601 format (yyyy-MM-ddTHH:mm:ssZ). For relative format, use 'now' for the current time or apply an offset with the available units: 's' for seconds, 'm' for minutes, 'h' for hours, and 'd' for days. For example, use 'now-2h' or '-2h' for a relative offset of 2 hours. |
⚠️ Deprecated Use literal values.
The type of the analyzer.
Implemented | Interface
⚠️ Deprecated Use literal values.
The type of the dimensional query.
EntityId | TimeseriesArray
⚠️ Deprecated Use literal values.
Determines the severity of the log.
Info | Severe | Tracing | Warning
⚠️ Deprecated Use literal values.
Info | Tracing | Warning
⚠️ Deprecated Use literal values.
Aborted | Completed | Running
⚠️ Deprecated Use literal values.
Failed | Successful | SuccessfulWithWarnings
⚠️ Deprecated Use literal values.
The type of the parameter, indicating the format of the value to be provided.
AnalyzerStructure | Boolean | DimensionQuery | Enumeration | Integer | Number | String | Timeframe | TimeseriesArray | TimeseriesQuery | Timestamp
FAQs
Davis AI - Predictive and Causal
We found that @dynatrace-sdk/client-davis-analyzers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.