ForecastAPI
- API version: 2.2.0
- Build date: 2026-07-24T07:12:18.848167260Z[Etc/UTC]
- Generator version: 7.16.0
Time series forecasting service with multiple algorithms and automatic method selection
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean installTo deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deployRefer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.forecastapi</groupId>
<artifactId>forecastapi-java-sdk</artifactId>
<version>2.2.0</version>
<scope>compile</scope>
</dependency>Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'forecastapi-java-sdk' jar has been published to maven central.
mavenLocal() // Needed if the 'forecastapi-java-sdk' jar has been published to the local maven repo.
}
dependencies {
implementation "com.forecastapi:forecastapi-java-sdk:2.2.0"
}At first generate the JAR by executing:
mvn clean packageThen manually install the following JARs:
target/forecastapi-java-sdk-2.2.0.jartarget/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import com.forecastapi.sdk.ApiClient;
import com.forecastapi.sdk.ApiException;
import com.forecastapi.sdk.Configuration;
import com.forecastapi.sdk.auth.*;
import com.forecastapi.sdk.model.*;
import com.forecastapi.sdk.api.AnalysisApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://forecastapi.com");
// Configure API key authorization: apiKey
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("apiKey");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
AnalysisApi apiInstance = new AnalysisApi(defaultClient);
ForecastRequest forecastRequest = new ForecastRequest(); // ForecastRequest |
try {
AnalysisResponse result = apiInstance.analyzeTimeSeries(forecastRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnalysisApi#analyzeTimeSeries");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}All URIs are relative to https://forecastapi.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AnalysisApi | analyzeTimeSeries | POST /v2/analyze | Analyze time series data without generating forecast |
| AnomalyDetectionApi | detectAnomalies | POST /v2/detect-anomalies | Detect anomalies in time series data |
| BatchForecastingApi | createBatchForecast | POST /v2/batch/forecast | Submit a batch of series for forecasting |
| BatchForecastingApi | getBatchForecast | GET /v2/batch/forecast/{batch_id} | Poll a batch forecast for status and results |
| BatchForecastingApi | presignBatchForecast | POST /v2/batch/forecast/presign | Get a presigned URL for a file-based batch upload |
| ForecastingApi | createForecast | POST /v2/forecast | Generate forecast for time series data |
| GroupedForecastingApi | createGroupedForecast | POST /v2/forecast/grouped | Submit a grouped (hierarchical) forecast with reconciliation |
| GroupedForecastingApi | getGroupedForecast | GET /v2/forecast/grouped/{grouped_forecast_id} | Poll a grouped forecast for status and results |
| HealthApi | getApiRoot | GET /v2 | API root endpoint |
| HealthApi | healthCheck | GET /v2/health | Health check endpoint |
| InventoryPlanningApi | createInventoryPlan | POST /v2/inventory-planning | Generate comprehensive inventory planning recommendations |
| ProductInsightsApi | createBatchProductInsights | POST /v2/batch/product-insights | Submit a batch of products for insights analysis |
| ProductInsightsApi | createProductInsights | POST /v2/product-insights | Analyze product performance for anomalies, trends and business insights |
| ProductInsightsApi | getProductInsightsBatch | GET /v2/batch/product-insights/{batch_id} | Poll a product insights batch for status and results |
| TrafficForecastingApi | createTrafficForecast | POST /v2/traffic-forecasting | Generate traffic forecasting with infrastructure scaling recommendations |
- AccumulateOptions
- AccumulatedForecast
- AccumulatedForecastAssumptions
- AccumulatedForecastByPeriodInner
- AdjustedForecast
- AdjustedForecastAdjustmentsAppliedInner
- AdjustmentsInner
- AnalysisResponse
- AnalysisResponseMeta
- AnalysisResponseMetaTiming
- AnalysisResponseResult
- AnalysisResponseResultCharacteristics
- AnomalyDetectionRequest
- AnomalyDetectionRequestAllOfAnomalySettings
- AnomalyDetectionResponse
- AnomalyDetectionResponseMeta
- AnomalyDetectionResponseMetaTiming
- AnomalyDetectionResponseResult
- AnomalyDetectionResponseResultAnalysis
- AnomalyDetectionResponseResultAnalysisDetectionSummary
- AnomalyDetectionResponseResultAnomaliesInner
- AutoSelection
- AutoSelectionScoresValue
- BatchForecastAccepted
- BatchForecastRequest
- BatchForecastSeries
- BatchForecastSeriesDataInner
- BatchForecastStatusResponse
- BatchForecastStatusResponsePartsInner
- BatchForecastStatusResponseResults
- BatchForecastStatusResponseResultsSummary
- BatchPresignResponse
- BatchSeriesResult
- CreateBatchProductInsights422Response
- CreateBatchProductInsights500Response
- CreateForecast400Response
- CreateForecast502Response
- CreateInventoryPlan400Response
- CreateInventoryPlan500Response
- CreateProductInsights400Response
- CreateTrafficForecast500Response
- DetectAnomalies422Response
- DetectAnomalies422ResponseOneOf
- DetectAnomalies500Response
- ErrorResponse
- ForecastPeriod
- ForecastRequest
- ForecastRequestDataInner
- ForecastResponse
- ForecastResponseMeta
- ForecastResponseMetaTiming
- ForecastResponseResult
- GetApiRoot200Response
- GetGroupedForecast404Response
- GroupedForecastAccepted
- GroupedForecastNode
- GroupedForecastRequest
- GroupedForecastResults
- GroupedForecastResultsReconciliation
- GroupedForecastSeries
- GroupedForecastSeriesDataInner
- GroupedForecastStatusResponse
- HealthCheck200Response
- InventoryPlanningRequest
- InventoryPlanningRequestDataInner
- InventoryPlanningRequestInventorySettings
- InventoryPlanningRequestInventorySettingsSuppliersInner
- InventoryPlanningResponse
- InventoryPlanningResponseMeta
- InventoryPlanningResponseMetaTiming
- InventoryPlanningResponseResult
- InventoryPlanningResponseResultForecastDataInner
- InventoryPlanningResponseResultStockAnalysis
- InventoryPlanningResponseResultSuppliersInner
- ProductInsight
- ProductInsightRecommendation
- ProductInsightsBatchRequest
- ProductInsightsBatchStatusResponse
- ProductInsightsRequest
- ProductInsightsRequestBaselinePeriodDays
- ProductInsightsRequestCostHistoryInner
- ProductInsightsRequestInsightSettings
- ProductInsightsRequestPurchasesInner
- ProductInsightsRequestSalesInner
- ProductInsightsResponse
- ProductInsightsResponseMeta
- ProductInsightsResponseMetaDataQuality
- ProductInsightsResponseMetaTiming
- ProductInsightsResponseResult
- ProductInsightsResponseResultComparison
- ProductInsightsResponseResultComparisonDevelopments
- ProductInsightsResponseResultProductInfo
- ProductInsightsResponseResultSummary
- ProductInsightsResponseResultSummaryAnalysisPeriod
- TrafficForecastingRequest
- TrafficForecastingRequestDataInner
- TrafficForecastingRequestTrafficSettings
- TrafficForecastingResponse
- TrafficForecastingResponseMeta
- TrafficForecastingResponseMetaTiming
- TrafficForecastingResponseResult
- TrafficForecastingResponseResultCapacityAnalysis
- TrafficForecastingResponseResultCapacityAnalysisUtilizationPeriodsInner
- TrafficForecastingResponseResultCostOptimization
- TrafficForecastingResponseResultCostOptimizationCostBreakdown
- TrafficForecastingResponseResultCostOptimizationRecommendationsInner
- TrafficForecastingResponseResultForecastDataInner
- TrafficForecastingResponseResultScalingRecommendations
- TrafficForecastingResponseResultScalingRecommendationsRecommendationsInner
- TrafficForecastingResponseResultTrafficAlerts
- TrafficForecastingResponseResultTrafficAlertsAlertsInner
- ValidationErrorResponse
- ValidationFailedResponse
- ValueBounds
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.