Time forecast model API
The Time forecast model API provides a way to run a time forecast model. It is exposed by the Data Hub component, and therefore the web service is located on the BMC Helix Capacity Optimization Data Hub server.
Before you begin
Ensure that the following requirements are met:
- Your user role has the Enable access to Time forecasting model API activity assigned to it. The out-of-the-box API-Client role has access to all the APIs by default. For more information about managing roles and activities, see Configuring-user-roles-and-access-groups.
- You have valid user credentials or a bearer token for authentication. For more information, see Accessing-the-public-APIs.
Method | URI Pattern | Description |
---|---|---|
POST | tfm/forecastmodel/execute | Executes the forecast model specified in the request and returns the ForecastResponse instance which contains the forecast results. |
Time forecast request format
Forecast requests can be submitted to the BMC Helix Capacity Optimization Data Hub TimeForecast Model service according to the following Document Type Definition (DTD):
<!ELEMENT forecastRequest (threshold?|statistics?|whatIfEvent*)>
<!ATTLIST forecastRequest seriesIdList CDATA #REQUIRED>
<!ATTLIST forecastRequest timeUnit CDATA #REQUIRED>
<!ATTLIST forecastRequest backperiodFromdate CDATA #REQUIRED>
<!ATTLIST forecastRequest forecastRange CDATA #REQUIRED>
<!ATTLIST forecastRequest algorithmId CDATA #IMPLIED>
<!ELEMENT statistics>
<!ATTLIST statistics applyTo CDATA #REQUIRED>
<!ATTLIST statistics stat CDATA #REQUIRED>
<!ELEMENT threshold (fixThreshold*| seriesThreshold*)>
<!ATTLIST threshold thresholdType CDATA #REQUIRED>
<!ELEMENT fixThreshold>
<!ATTLIST fixThreshold applyTo CDATA #REQUIRED>
<!ATTLIST fixThreshold multFactor CDATA #REQUIRED>
<!ELEMENT seriesThreshold>
<!ATTLIST seriesThreshold applyTo CDATA #REQUIRED>
<!ATTLIST seriesThreshold thresholdSeries CDATA #REQUIRED>
<!ATTLIST seriesThreshold multFactor CDATA #REQUIRED>
<!ELEMENT whatIfEvent(whatIfProps*)>
<!ATTLIST whatIfEvent eventType #REQUIRED>
<!ATTLIST whatIfEvent eventTime #REQUIRED>
<!ATTLIST whatIfEvent eventSeriesIdList #REQUIRED>
<!ELEMENT whatIfProps>
<!ATTLIST whatIfProps key CDATA #REQUIRED>
<!ATTLIST whatIfProps value CDATA #REQUIRED>
]>
Time forecast request format parameters
The forecast request format is composed of the following parameter sets:
Basic parameters
Consider the following example that employs forecast request format parameters mentioned in the preceding table:
Statistics parameters
Consider the following example that employs forecast request format parameters mentioned in the preceding table:
Threshold parameters
Consider the following example that employs forecast request format parameters mentioned in the preceding table:
Time forecast response format
Forecast responses can be submitted to the BMC Helix Capacity Optimization Data Hub TimeForecast Model service according to the following Document Type Definition (DTD):
<!ELEMENT forecastResponse (forecastRequest ,forecastedSeries)>
<!ELEMENT forecastRequest (threshold*| statistics*|whatIfEvent*)>
<!ATTLIST forecastRequest seriesIdList CDATA #REQUIRED>
<!ATTLIST forecastRequest timeUnit CDATA #REQUIRED>
<!ATTLIST forecastRequest backperiodFromdate CDATA #REQUIRED>
<!ATTLIST forecastRequest forecastRange CDATA #REQUIRED>
<!ATTLIST forecastRequest algorithmId CDATA #IMPLIED>
<!ELEMENT threshold (fixThreshold*| seriesThreshold*)>
<!ATTLIST threshold thresholdType CDATA #REQUIRED>
<!ELEMENT fixThreshold>
<!ATTLIST fixThreshold applyTo CDATA #REQUIRED>
<!ATTLIST fixThreshold multFactor CDATA #REQUIRED>
<!ELEMENT seriesThreshold>
<!ATTLIST seriesThreshold applyTo CDATA #REQUIRED>
<!ATTLIST seriesThreshold thresholdSeries CDATA #REQUIRED>
<!ATTLIST seriesThreshold multFactor CDATA #REQUIRED>
<!ELEMENT whatIfEvent(whatIfProps*)>
<!ATTLIST whatIfEvent eventType #REQUIRED>
<!ATTLIST whatIfEvent eventTime #REQUIRED>
<!ATTLIST whatIfEvent eventSeriesIdList #REQUIRED>
<!ELEMENT whatIfProps>
<!ATTLIST whatIfProps key CDATA #REQUIRED>
<!ATTLIST whatIfProps value CDATA #REQUIRED>
<!ELEMENT forecastedSeries (DATA+)>
<!ELEMENT data>
<!ATTLIST data ts CDATA #REQUIRED>
<!ATTLIST data value CDATA #REQUIRED>
<!ATTLIST data duration CDATA #REQUIRED>
<!ATTLIST data overThreshold CDATA #REQUIRED>
<!ATTLIST data isForecastedCDATA #REQUIRED>
]>