Poll an analyzer execution in Dynatrace with the Davis AI Predictive and Causal API using a request token to check status and retrieve any partial result.
| GET | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/davis/analyzers/v1/analyzers/{analyzer-name}:poll |
You provide the analyzer-name path parameter and the required request-token query parameter, and can use timeout-seconds to control how long the call waits. The response returns the current analyzer execution status and an optional partial result.
To execute this request, you need a platform token or OAuth access token with davis:analyzers:execute scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| analyzer-name | string | The name of the analyzer. | path | Required |
| request-token | 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. | query | Required |
| timeout-seconds | integer | 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. | query | Optional |
| Code | Type | Description |
|---|---|---|
| 200 | Analyzer | The current analyzer execution status and an optional partial result. |
| 400 | Analyzer | Invalid or malformed request. |
| 403 | Analyzer | Insufficient permissions. |
| 404 | Analyzer | No analyzer available with the requested name. |
| 410 | Analyzer | 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. |
| 4XX | Analyzer | Client error. |
| 5XX | Analyzer | Internal server error. |
AnalyzerExecuteResult objectResult of the analyzer execution.
| Element | 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. |
| ttlInSeconds | integer | Time-to-live until the result is not available anymore. |
| result | Analyzer | - |
AnalyzerResult object| Element | Type | Description |
|---|---|---|
| resultId | string | The uniquely identifying ID of the result. Used for logging. |
| resultStatus | string | -The element can hold these values
|
| executionStatus | string | -The element can hold these values
|
| input | Analyzer | The map of actual data matching the input and output definition of the analyzer. |
| logs | Analyzer | - |
| output | Analyzer | - |
| data | Analyzer | - |
| metadata | Analyzer | Metadata about the analyzer execution. |
AnalyzerInput objectThe input is specific to an analyzer. Get the definition of the analyzer to retrieve the required input structure.
AnalyzerData objectThe map of actual data matching the input and output definition of the analyzer.
objectAnalyzerGeneralParameters objectParameters that are present in all analyzer input parameter definitions.
| Element | Type | Description |
|---|---|---|
| timeframe | Timeframe | - |
| resolveDimensionalQueryData | boolean | - |
| logVerbosity | Analyzer | Determines the severity of the log. The element can hold these values
|
Timeframe object| Element | Type | Description |
|---|---|---|
| startTime | 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. |
| 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. |
AnalyzerExecutionLogLevel objectDetermines the severity of the log.
AnalyzerExecutionLog object| Element | Type | Description |
|---|---|---|
| level | Analyzer | Determines the severity of the log. The element can hold these values
|
| message | 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. |
AnalyzerOutput objectThe output is specific to an analyzer. Get the definition of the analyzer to retrieve the required output structure.
AnalyzerOutputSystemParameters objectParameters that are present in all analyzer output parameter definitions.
| Element | Type | Description |
|---|---|---|
| logs | Analyzer | - |
AnalyzerOutputLog object| Element | Type | Description |
|---|---|---|
| level | Analyzer | -The element can hold these values
|
| message | string | - |
AnalyzerOutputLogLevel objectAnalyzerDimensionalData objectA list of resolved dimensional data.
| Element | Type | Description |
|---|---|---|
| query | Dimension | A query for dimensional data such as timeseries, entities, or logs. |
| value | object | The resolved value of the dimensional query. |
| type | string | The type of the dimensional query. The element can hold these values
|
DimensionQuery objectA query for dimensional data such as timeseries, entities, or logs.
objectAnalyzerMetadata objectMetadata about the analyzer execution.
| Element | Type | Description |
|---|---|---|
| grail | Analyzer | Grail-specific metadata about the analyzer execution. |
AnalyzerMetadataGrail objectGrail-specific metadata about the analyzer execution.
| Element | Type | Description |
|---|---|---|
| scannedBytes | integer | The total number of bytes scanned in all Grail queries that were run as part of the analyzer execution. |
AnalyzerErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Analyzer | The error that is returned for unsuccessful responses. |
AnalyzerError objectThe error that is returned for unsuccessful responses.
| Element | Type | Description |
|---|---|---|
| code | integer | The HTTP status code of the error. |
| message | string | - |
| details | Analyzer | - |
AnalyzerErrorDetails object| Element | Type | Description |
|---|---|---|
| constraintViolations | Constraint | - |
ConstraintViolation objectA constraint violation indicating why an error has occurred.
AnalyzerExecutionLog object| Element | Type | Description |
|---|---|---|
| level | Analyzer | Determines the severity of the log. The element can hold these values
|
| message | 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. |
AnalyzerExecutionLogLevel objectDetermines the severity of the log.
{"result": {"resultId": "e4fd114dba084fd9","resultStatus": "SUCCESSFUL","executionStatus": "COMPLETED","input": {"generalParameters": {"timeframe": null,"logVerbosity": "WARNING","resolveDimensionalQueryData": false},"forecastHorizon": 10,"timeSeriesData": {"expression": "timeseries avg(dt.host.cpu.usage)"},"coverageProbability": 0.9,"nPaths": 200},"output": [{"timeSeriesDataWithPredictions": {"records": [{"dt.davis.forecast:lower": [30.06526744477648,30.469005693579895,30.641933747981863,31.266633573314543,31.018440163566783,30.832801407033784,30.127440957160143,31.63919313816315,30.835958661995043,29.933730613970294],"dt.davis.forecast:upper": [44.250848540072205,45.32430402865753,45.124536344034915,44.62291543678966,44.48090669793653,43.913223381905276,42.98826349674527,43.88073356829243,44.52412625492842,42.32966344989203],"dt.davis.forecast:point": [37.06917039490001,38.068881128336955,37.47658985279556,37.24624051130464,37.24271470069583,37.658750126351876,37.20201557131627,38.2574100893675,36.96177127701703,37.83834653098133],"interval": "60000000000","timeframe": {"end": "2023-03-22T12:19Z","start": "2023-03-22T12:09Z"},"dt.davis.meta.dataName": "avg(dt.host.cpu.usage)"}],"types": [{"indexRange": [0,0],"mappings": {"dt.davis.forecast:lower": {"type": "array","types": [{"indexRange": [0,9],"mappings": {"element": {"type": "double"}}}]},"timeframe": {"type": "timeframe"},"dt.davis.meta.dataName": {"type": "string"},"dt.davis.forecast:upper": {"type": "array","types": [{"indexRange": [0,9],"mappings": {"element": {"type": "double"}}}]},"dt.davis.forecast:point": {"type": "array","types": [{"indexRange": [0,9],"mappings": {"element": {"type": "double"}}}]},"interval": {"type": "duration"}}}]},"forecastQualityAssessment": "valid","analysisStatus": "OK","analyzedTimeSeriesQuery": {"expression": "timeseries avg(dt.host.cpu.usage) | ","timeframe": {"startTime": "2023-03-22T10:08:48.997Z","endTime": "2023-03-22T12:08:48.997Z"}}}]}}
{"error": {"code": 400,"message": "string","details": {"constraintViolations": [{"level": "TRACING","message": "string","path": "string"}]}}}