v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1422313.2 KB

Retrieves a what-if forecast.

post/#X-Amz-Target=AmazonForecastRuntime.QueryWhatIfForecast

Headers

X-Amz-Target'AmazonForecastRuntime.QueryWhatIfForecast' required

Request body

WhatIfForecastArnstring required

The Amazon Resource Name (ARN) of the what-if forecast to query.

StartDatestring

The start date for the what-if forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00.

EndDatestring

The end date for the what-if forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00.

Filtersobject required
<p>The filtering criteria to apply when retrieving the forecast. For example, to get the forecast for <code>client_21</code> in the electricity usage dataset, specify the following:</p> <p> <code>{"item_id" : "client_21"}</code> </p> <p>To get the full what-if forecast, use the <a href="https://docs.aws.amazon.com/en_us/forecast/latest/dg/API_CreateWhatIfForecastExport.html">CreateForecastExportJob</a> operation.</p>
NextTokenstring

If the result of the previous request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

Response

Success