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.

 

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):

<!DOCTYPE [
<!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:

Example

Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.

<forecastRequest seriesIdList ='SOB1366282' timeUnit ='DAY'
backperiodFromdate ='D60' forecastRange='D14'/>

Statistics parameters

Consider the following example that employs forecast request format parameters mentioned in the preceding table:

Example

Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.
Condition: Maximum statistic will be used to compute forecast.

<forecastRequest seriesIdList='SOB1366282'
timeUnit ='DAY'
backperiodFromdate='D60'
forecastRange='D14'>
<statistics applyTo='SOB1366282'
stat='MAXVALUE'/>
</forecastRequest>

Threshold parameters

Consider the following example that employs forecast request format parameters mentioned in the preceding table:

Example 1

Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.
Condition: A fixed threshold set at 50% of series 1366282 will be applied to the forecast.

<forecastRequest seriesIdList='SOB1366282'
timeUnit ='DAY'
backperiodFromdate='D60'
forecastRange='D14'>
<threshold thresholdType='FIX'>
<fixThreshold applyTo='SOB1366282' multFactor='50'/>
</threshold>
<statistics applyTo='SOB1366282' stat='MAXVALUE'/>
</forecastRequest>

Example 2
 Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.
Condition: Series 1366296 will be used as threshold limit for series 1366281.

<forecastRequest seriesIdList='SOB1366281'
timeUnit ='DAY'
backperiodFromdate='D60'
forecastRange='D14'>
<threshold thresholdType='SERIES'>
<seriesThreshold applyTo='SOB1366281'
multFactor='90'
thresholdSeries='SOB1366296'/>
</threshold>
<statistics applyTo='SOB1366281'
stat='MAXVALUE'/>
</forecastRequest>

What-if events parameters

What-if events parameters: Event types

Consider the following example that employs forecast request format parameters mentioned in the preceding table:

Example

Forecast request on the SOB1366282 system series, at DAY resolution, using the past 60 days, and forecasting on 14 days.
Condition: A CPU SpeedUp whatIf event (from 4 to 8 cores) is also shown.

<forecastRequest seriesIdList='SOB1366282'
timeUnit ='DAY'
backperiodFromdate='D60'
forecastRange='D14'>
<whatIfEvent eventType=2
eventTime='2011-01-01 00:00:00'
eventSeriesIdList ='SOB1366282'>
<whatIfProps key='EVENTCURRENTCPU' value=4/>
<whatIfProps key='EVENTNEWCPUNUM' value=8/>
<whatIfProps key='EVENTNEWCPUMHZ' value=1500/>
</whatIfEvent>
</forecastRequest>

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):

<!DOCTYPE [
<!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>
]>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*